Cody

Solution 1166133

Submitted on 19 Apr 2017 by Vishvaksenan A.
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))

1 2 4 2 4 2

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

1 3 7 2 7 3 3 9 1

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

1 3 47 2 7 43 3 13 37 4 19 31 5 31 19 6 37 13 7 43 7 8 47 3 9 49 1

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

1 13 467 2 17 463 3 19 461 4 23 457 5 31 449 6 37 443 7 41 439 8 47 433 9 59 421 10 61 419 11 71 409 12 79 401 13 83 397 14 97 383 15 101 379 16 107 373 17 113 367 18 127 353 19 131 349 20 149 331 21 163 317 22 167 313 23 173 307 24 197 283 25 199 281 26 211 269 27 223 257 28 229 251 29 239 241 30 241 239 31 251 229 32 257 223 33 269 211 34 281 199 35 283 197 36 307 173 37 313 167 38 317 163 39 331 149 40 349 131 41 353 127 42 367 113 43 373 107 44 379 101 45 383 97 46 397 83 47 401 79 48 409 71 49 419 61 50 421 59 51 433 47 52 439 41 53 443 37 54 449 31 55 457 23 56 461 19 57 463 17 58 467 13

Suggested Problems

More from this Author95