Cody

Solution 1763640

Submitted on 27 Mar 2019 by Samatha Aleti
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
n = 6; c_correct = 1; assert(isequal(goldbach2(n),c_correct))

primeSet = 2 3 5 i = 1 j = 1 j = 2 j = 3 i = 2 j = 2 c = 1 j = 3 i = 3 j = 3

2   Pass
n = 10; c_correct = 2; assert(isequal(goldbach2(n),c_correct))

primeSet = 2 3 5 7 i = 1 j = 1 j = 2 j = 3 j = 4 i = 2 j = 2 j = 3 j = 4 c = 1 i = 3 j = 3 c = 2 j = 4 i = 4 j = 4

3   Pass
n = 50; c_correct = 4; assert(isequal(goldbach2(n),c_correct))

primeSet = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 i = 1 j = 1 j = 2 j = 3 j = 4 j = 5 j = 6 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 i = 2 j = 2 j = 3 j = 4 j = 5 j = 6 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 c = 1 i = 3 j = 3 j = 4 j = 5 j = 6 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 i = 4 j = 4 j = 5 j = 6 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 c = 2 j = 15 i = 5 j = 5 j = 6 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 i = 6 j = 6 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 c = 3 j = 13 j = 14 j = 15 i = 7 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 i = 8 j = 8 j = 9 j = 10 j = 11 c = 4 j = 12 j = 13 j = 14 j = 15 i = 9 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 i = 10 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 i = 11 j = 11 j = 12 j = 13 j = 14 j = 15 i = 12 j = 12 j = 13 j = 14 j = 15 i = 13 j = 13 j = 14 j = 15 i = 14 j = 14 j = 15 i = 15 j = 15

4   Pass
n = 480; c_correct = 29; assert(isequal(goldbach2(n),c_correct))

primeSet = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 60 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 Columns 61 through 90 283 293 307 311 313 317 331 337 347 349 353 359 367 373 379 383 389 397 401 409 419 421 431 433 439 443 449 457 461 463 Columns 91 through 92 467 479 i = 1 j = 1 j = 2 j = 3 j = 4 j = 5 j = 6 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 j = 16 j = 17 j = 18 j = 19 j = 20 j = 21 j = 22 j = 23 j = 24 j = 25 j = 26 j = 27 j = 28 j = 29 j = 30 j = 31 j = 32 j = 33 j = 34 j = 35 j = 36 j = 37 j = 38 j = 39 j = 40 j = 41 j = 42 j = 43 j = 44 j = 45 j = 46 j = 47 j = 48 j = 49 j = 50 j = 51 j = 52 j = 53 j = 54 j = 55 j = 56 j = 57 j = 58 j = 59 j = 60 j = 61 j = 62 j = 63 j = 64 j = 65 j = 66 j = 67 j = 68 j = 69 j = 70 j = 71 j = 72 j = 73 j = 74 j = 75 j = 76 j = 77 j = 78 j = 79 j = 80 j = 81 j = 82 j = 83 j = 84 j = 85 j = 86 j = 87 j = 88 j = 89 j = 90 j = 91 j = 92 i = 2 j = 2 j = 3 j = 4 j = 5 j = 6 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 j = 16 j = 17 j = 18 j = 19 j = 20 j = 21 j = 22 j = 23 j = 24 j = 25 j = 26 j = 27 j = 28 j = 29 j = 30 j = 31 j = 32 j = 33 j = 34 j = 35 j = 36 j = 37 j = 38 j = 39 j = 40 j = 41 j = 42 j = 43 j = 44 j = 45 j = 46 j = 47 j = 48 j = 49 j = 50 j = 51 j = 52 j = 53 j = 54 j = 55 j = 56 j = 57 j = 58 j = 59 j = 60 j = 61 j = 62 j = 63 j = 64 j = 65 j = 66 j = 67 j = 68 j = 69 j = 70 j = 71 j = 72 j = 73 j = 74 j = 75 j = 76 j = 77 j = 78 j = 79 j = 80 j = 81 j = 82 j = 83 j = 84 j = 85 j = 86 j = 87 j = 88 j = 89 j = 90 j = 91 j = 92 i = 3 j = 3 j = 4 j = 5 j = 6 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 j = 16 j = 17 j = 18 j = 19 j = 20 j = 21 j = 22 j = 23 j = 24 j = 25 j = 26 j = 27 j = 28 j = 29 j = 30 j = 31 j = 32 j = 33 j = 34 j = 35 j = 36 j = 37 j = 38 j = 39 j = 40 j = 41 j = 42 j = 43 j = 44 j = 45 j = 46 j = 47 j = 48 j = 49 j = 50 j = 51 j = 52 j = 53 j = 54 j = 55 j = 56 j = 57 j = 58 j = 59 j = 60 j = 61 j = 62 j = 63 j = 64 j = 65 j = 66 j = 67 j = 68 j = 69 j = 70 j = 71 j = 72 j = 73 j = 74 j = 75 j = 76 j = 77 j = 78 j = 79 j = 80 j = 81 j = 82 j = 83 j = 84 j = 85 j = 86 j = 87 j = 88 j = 89 j = 90 j = 91 j = 92 i = 4 j = 4 j = 5 j = 6 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 j = 16 j = 17 j = 18 j = 19 j = 20 j = 21 j = 22 j = 23 j = 24 j = 25 j = 26 j = 27 j = 28 j = 29 j = 30 j = 31 j = 32 j = 33 j = 34 j = 35 j = 36 j = 37 j = 38 j = 39 j = 40 j = 41 j = 42 j = 43 j = 44 j = 45 j = 46 j = 47 j = 48 j = 49 j = 50 j = 51 j = 52 j = 53 j = 54 j = 55 j = 56 j = 57 j = 58 j = 59 j = 60 j = 61 j = 62 j = 63 j = 64 j = 65 j = 66 j = 67 j = 68 j = 69 j = 70 j = 71 j = 72 j = 73 j = 74 j = 75 j = 76 j = 77 j = 78 j = 79 j = 80 j = 81 j = 82 j = 83 j = 84 j = 85 j = 86 j = 87 j = 88 j = 89 j = 90 j = 91 j = 92 i = 5 j = 5 j = 6 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 j = 16 j = 17 j = 18 j = 19 j = 20 j = 21 j = 22 j = 23 j = 24 j = 25 j = 26 j = 27 j = 28 j = 29 j = 30 j = 31 j = 32 j = 33 j = 34 j = 35 j = 36 j = 37 j = 38 j = 39 j = 40 j = 41 j = 42 j = 43 j = 44 j = 45 j = 46 j = 47 j = 48 j = 49 j = 50 j = 51 j = 52 j = 53 j = 54 j = 55 j = 56 j = 57 j = 58 j = 59 j = 60 j = 61 j = 62 j = 63 j = 64 j = 65 j = 66 j = 67 j = 68 j = 69 j = 70 j = 71 j = 72 j = 73 j = 74 j = 75 j = 76 j = 77 j = 78 j = 79 j = 80 j = 81 j = 82 j = 83 j = 84 j = 85 j = 86 j = 87 j = 88 j = 89 j = 90 j = 91 j = 92 i = 6 j = 6 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 j = 16 j = 17 j = 18 j = 19 j = 20 j = 21 j = 22 j = 23 j = 24 j = 25 j = 26 j = 27 j = 28 j = 29 j = 30 j = 31 j = 32 j = 33 j = 34 j = 35 j = 36 j = 37 j = 38 j = 39 j = 40 j = 41 j = 42 j = 43 j = 44 j = 45 j = 46 j = 47 j = 48 j = 49 j = 50 j = 51 j = 52 j = 53 j = 54 j = 55 j = 56 j = 57 j = 58 j = 59 j = 60 j = 61 j = 62 j = 63 j = 64 j = 65 j = 66 j = 67 j = 68 j = 69 j = 70 j = 71 j = 72 j = 73 j = 74 j = 75 j = 76 j = 77 j = 78 j = 79 j = 80 j = 81 j = 82 j = 83 j = 84 j = 85 j = 86 j = 87 j = 88 j = 89 j = 90 j = 91 c = 1 j = 92 i = 7 j = 7 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 j = 16 j = 17 j = 18 j = 19 j = 20 j = 21 j = 22 j = 23 j = 24 j = 25 j = 26 j = 27 j = 28 j = 29 j = 30 j = 31 j = 32 j = 33 j = 34 j = 35 j = 36 j = 37 j = 38 j = 39 j = 40 j = 41 j = 42 j = 43 j = 44 j = 45 j = 46 j = 47 j = 48 j = 49 j = 50 j = 51 j = 52 j = 53 j = 54 j = 55 j = 56 j = 57 j = 58 j = 59 j = 60 j = 61 j = 62 j = 63 j = 64 j = 65 j = 66 j = 67 j = 68 j = 69 j = 70 j = 71 j = 72 j = 73 j = 74 j = 75 j = 76 j = 77 j = 78 j = 79 j = 80 j = 81 j = 82 j = 83 j = 84 j = 85 j = 86 j = 87 j = 88 j = 89 j = 90 c = 2 j = 91 j = 92 i = 8 j = 8 j = 9 j = 10 j = 11 j = 12 j = 13 j = 14 j = 15 j = 16 j = 17 j = 18 j = 19 j = 20 j = 21 j = 22 j = 23 j = 24 j = 25 j = 26 j = 27 j = 28 j = 29 j = 30 j = 31 j = 32 j = 33 j = 34 j = 35 j = 36 j = 37 j = 38 j = 39 j = 40 j = ...