Cody

Solution 2035094

Submitted on 25 Nov 2019 by dilek bulut
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))

d = 3 5 b = [] k = 3 t = 1 a = 1 b = 3 c = 1 k = 1 t = 2 a = 1×0 empty double row vector no no

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

d = 3 5 7 9 b = [] k = 7 t = 1 a = 3 b = 3 c = 1 k = 5 t = 2 a = 2 b = 3 5 c = 2 k = 3 k = 1 t = 1 4 a = 1×0 empty double row vector no no

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

d = 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 b = [] k = 47 t = 1 a = 23 b = 3 c = 1 k = 45 t = 2 a = 1 2 4 7 22 no no k = 43 t = 3 a = 21 b = 3 7 c = 2 k = 41 t = 1 4 a = 20 no no k = 39 t = 5 a = 1 6 19 no no k = 37 t = 6 a = 18 b = 3 7 13 c = 3 k = 35 t = 1 2 7 a = 2 3 17 no no k = 33 t = 8 a = 1 5 16 no no k = 31 t = 9 a = 15 b = 3 7 13 19 c = 4 k = 29 t = 1 3 10 a = 14 no no k = 27 t = 11 a = 1 4 13 no no k = 25 t = 2 12 a = 2 12 no no k = 23 t = 1 4 13 a = 11 no no k = 21 t = 14 a = 1 3 10 no no k = 19 k = 17 t = 1 5 16 a = 8 no no k = 15 t = 2 3 17 a = 1 2 7 no no k = 13 k = 11 t = 1 6 19 a = 5 no no k = 9 t = 20 a = 1 4 no no k = 7 k = 5 t = 1 2 4 7 22 a = 2 no no k = 3 k = 1 t = 3 24 a = 1×0 empty double row vector no no

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

d = Columns 1 through 30 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 Columns 31 through 60 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 Columns 61 through 90 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 175 177 179 181 Columns 91 through 120 183 185 187 189 191 193 195 197 199 201 203 205 207 209 211 213 215 217 219 221 223 225 227 229 231 233 235 237 239 241 Columns 121 through 150 243 245 247 249 251 253 255 257 259 261 263 265 267 269 271 273 275 277 279 281 283 285 287 289 291 293 295 297 299 301 Columns 151 through 180 303 305 307 309 311 313 315 317 319 321 323 325 327 329 331 333 335 337 339 341 343 345 347 349 351 353 355 357 359 361 Columns 181 through 210 363 365 367 369 371 373 375 377 379 381 383 385 387 389 391 393 395 397 399 401 403 405 407 409 411 413 415 417 419 421 Columns 211 through 239 423 425 427 429 431 433 435 437 439 441 443 445 447 449 451 453 455 457 459 461 463 465 467 469 471 473 475 477 479 b = [] k = 477 t = 1 a = 1 4 26 79 238 no no k = 475 t = 2 a = 2 9 12 47 237 no no k = 473 t = 3 a = 5 21 236 no no k = 471 t = 1 4 a = 1 78 235 no no k = 469 t = 5 a = 3 33 234 no no k = 467 t = 6 a = 233 b = 13 c = 1 k = 465 t = 1 2 7 a = 1 2 7 15 46 77 232 no no k = 463 t = 8 a = 231 b = 13 17 c = 2 k = 461 t = 9 a = 230 b = 13 17 19 c = 3 k = 459 t = 1 3 10 a = 1 4 8 13 25 76 229 no no k = 457 t = 11 a = 228 b = 13 17 19 23 c = 4 k = 455 t = 2 12 a = 2 3 6 17 32 45 227 no no k = 453 t = 1 4 13 a = 1 75 226 no no k = 451 t = 14 a = 5 20 225 no no k = 449 t = 15 a = 224 b = 13 17 19 23 31 c = 5 k = 447 t = 1 5 16 a = 1 74 223 no no k = 445 t = 2 3 17 a = 2 44 222 no no k = 443 t = 18 a = 221 b = 13 17 19 23 31 37 c = 6 k = 441 t = 1 6 19 a = 1 3 4 10 24 31 73 220 no no k = 439 t = 20 a = 219 b = 13 17 19 23 31 37 41 c = 7 k = 437 t = 21 a = 9 11 218 no no k = 435 t = 1 2 4 7 22 a = 1 2 7 14 43 72 217 no no k = 433 t = 23 a = 216 b = 13 17 19 23 31 37 41 47 c = 8 k = 431 t = 3 24 a = 215 no no k = 429 t = 1 8 25 a = 1 5 6 16 19 71 214 no no k = 427 t = 26 a = 3 30 213 no no k = 425 t = 2 5 27 a = 2 8 12 42 212 no no k = 423 t = 1 9 28 a = 1 4 23 70 211 no no k = 421 t = 29 a = 210 b = 13 17 19 23 31 37 41 47 59 c = 9 k = 419 t = 30 a = 209 b = 13 17 19 23 31 37 41 47 59 61 c = 10 k = 417 t = 1 3 4 10 31 a = 1 69 208 no no k = 415 t = 2 6 32 a = 2 41 207 no no k = 413 t = 33 a = 3 29 206 no no k = 411 t = 1 11 34 a = 1 68 205 no no k = 409 t = 35 a = 204 b = 13 17 19 23 31 37 41 47 59 61 71 c = 11 k = 407 t = 36 a = 5 18 203 no no k = 405 t = 1 2 7 12 37 a = 1 2 4 7 13 22 40 67 202 no no k = 403 t = 3 5 38 a = 6 15 201 no no k = 401 t = 39 a = 200 b = 13 17 19 23 31 37 41 47 59 61 71 79 c = 12 k = 399 t = 1 4 13 40 a = 1 3 9 10 28 66 199 no no k = 397 t = 41 a = 198 b = 13 17 19 23 31 37 41 47 59 61 71 79 83 c = 13 k = 395 t = 2 8 42 a = 2 39 197 no no k = 393 t = 1 14 43 a = 1 65 196 no no k = 391 t = 44 a = 8 11 195 no no k = 389 t = 3 6 45 a = 194 no no k = 387 t = 1 15 46 a = 1 4 21 64 193 no no k = 385 t = 2 9 47 a = 2 3 5 17 27 38 192 no no k = 383 t = 48 a = 191 b = 13 17 19 23 31 37 41 47 59 61 71 79 83 97 c = 14 k = 381 t = 1 4 5 16 49 a = 1 63 190 no no k = 379 t = 50 a = 189 b = 13 17 19 23 31 37 41 47 59 61 71 79 83 97 101 c = 15 k = 377 t = 51 a = 6 14 188 no no k = 375 t = 1 2 3 7 10 17 52 a = 1 2 7 12 37 62 187 no no k = 373 t = 53 a = 186 b = 13 17 19 23 31 37 41 47 59 61 71 79 83 97 101 107 c = 16 k = 371 t = 54 a = 3 26 185 no no k = 369 t = 1 18 55 a = 1 4 20 61 184 no no k = 367 t = 56 a = 183 b = 13 17 19 23 31 37 41 47 59 61 71 79 83 97 101 107 113 c = 17 k = 365 t = 2 11 57 a = 2 36 182 no no k = 363 t = 1 4 6 19 58 a = 1 5 16 60 181 no no k = 361 t = 3 8 59 a = 9 180 no no k = 359 t = 5 60 a = 179 no no k = 357 t = 1 20 61 a = 1 3 8 10 25 59 178 no no k = 355 t = 2 12 62 a = 2 35 177 no no k = 353 t = 63 a = 176 b = 13 17 19 23 31 37 41 47 59 61 71 79 83 97 101 107 113 127 c = 18 k = 351 t = 1 21 64 a = 1 4 6 13 19 58 175 no no k = 349 t = 65 a = 174 b = 13 17 19 23 31 37 41 47 59 61 71 79 83 97 101 107 113 127 131 c = 19 k = 347 t = 3 9 66 a = 173 no no k = 345 t = 1 2 4 7 13 22 67 a = 1 2 7 11 34 57 172 no no k = 343 t = 68 a = 3 24 171 no no k = 341 t = 69 a = 5 15 170 no no k = 339 t = 1 23 70 a = 1 56 169 no no k = 337 t = 5 6 71 a = 168 no no k = 335 t = 2 14 72 a = 2 33 167 no no k = 333 t = 1 3 10 24 73 a = 1 4 18 55 166 no no k = 331 t = 74 a = 165 b = 13 17 19 23 31 37 41 47 59 61 71 79 83 97 101 107 113 127 131 149 c = 20 k = 329 t = 75 a = 3 23 164 no no k = 327 t = 1 4 8 25 76 a = 1 54 163 no no k = 325 t = 2 15 77 a = 2 6 12 32 162 no no k = 323 t = 78 a = 8 9 161 no no k = 321 t = 1 26 79 a = 1 53 160 no no k = 319 t = 3 11 80 a = 5 14 159 no no k = 317 t = 81 a = 158 b = 13 17 19 23 31 37 41 47 59 61 71 79 83 97 101 107 113 127 131 149 163 c = 21 k = 315 t = 1 2 5 7 16 27 82 a = 1 2 3 4 7 10 17 22 31 52 157 no no k = 313 t = 83 a = 156 b = 13 17 19 23 31 37 41 47 59 61 71 79 83 97 101 107 113 127 131 149 163 167 c = 22 k = 311 t = 6 84 a = 155 no no k = 309 t = 1 4 9 28 85 a = 1 51 154 no no k = 307 t = 86 a = 153 b = 13 17 19 23 31 37 41 47 59 61 71 79 83 97 101 107 113 127 131 149 163 167 1...