Cody

Solution 1906196

Submitted on 20 Aug 2019
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   Fail
n = 6; c_correct = 1; assert(isequal(goldbach2(n),c_correct))

pr = [] cnt = 0 pr = 2 pr = 2 3 pr = 2 3 5 p_l = 3 c = 0 c = 0

Assertion failed.

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

pr = [] cnt = 0 pr = 2 pr = 2 3 pr = 2 3 5 pr = 2 3 5 7 p_l = 4 c = 0 cnt = 1 c = 1 c = 1

Assertion failed.

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

pr = [] cnt = 0 pr = 2 pr = 2 3 pr = 2 3 5 pr = 2 3 5 7 pr = 2 3 5 7 11 pr = 2 3 5 7 11 13 pr = 2 3 5 7 11 13 17 pr = 2 3 5 7 11 13 17 19 pr = 2 3 5 7 11 13 17 19 23 pr = 2 3 5 7 11 13 17 19 23 29 pr = 2 3 5 7 11 13 17 19 23 29 31 pr = 2 3 5 7 11 13 17 19 23 29 31 37 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 p_l = 15 c = 0 cnt = 1 c = 1 c = 1 cnt = 2 c = 2 c = 2 cnt = 3 c = 3 c = 3 cnt = 4 c = 4 c = 4 c = 4 c = 4 c = 4 c = 4 c = 4

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

pr = [] cnt = 0 pr = 2 pr = 2 3 pr = 2 3 5 pr = 2 3 5 7 pr = 2 3 5 7 11 pr = 2 3 5 7 11 13 pr = 2 3 5 7 11 13 17 pr = 2 3 5 7 11 13 17 19 pr = 2 3 5 7 11 13 17 19 23 pr = 2 3 5 7 11 13 17 19 23 29 pr = 2 3 5 7 11 13 17 19 23 29 31 pr = 2 3 5 7 11 13 17 19 23 29 31 37 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 pr = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 pr = 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 pr = 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 pr = 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 pr = 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 pr = 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 pr = 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 pr = 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 Column 31 127 pr = 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 32 127 131 pr = 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 33 127 131 137 pr = 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 34 127 131 137 139 pr = 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 35 127 131 137 139 149 pr = 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 36 127 131 137 139 149 151 pr = 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 37 127 131 137 139 149 151 157 pr = 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 38 127 131 137 139 149 151 157 163 pr = 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 39 127 131 137 139 149 151 157 163 167 pr = 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 40 127 131 137 139 149 151 157 163 167 173 pr = 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 41 127 131 137 139 149 151 157 163 167 173 179 pr = 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 42 127 131 137 139 149 151 157 163 167 173 179 181 pr = 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 43 127 131 137 139 149 151 157 163 167 173 179 181 191 pr = 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 44 127 131 137 139 149 151 157 163 167 173 179 181 191 193 pr = 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 45 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 pr = 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 46 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 pr = 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 47 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 pr = 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 48 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 pr = 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 49 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 pr = 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 50 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 pr = 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 51 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 pr = 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 52 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 pr = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 ...