Cody

Solution 1288098

Submitted on 16 Oct 2017 by Ratchet_Hamster
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))

p2 = 5 c = 0 p2 = 4 c = 0 p2 = 3 c = 1

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

p2 = 9 c = 0 p2 = 8 c = 0 p2 = 7 c = 1 p2 = 6 c = 1 p2 = 5 c = 2

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

p2 = 49 c = 0 p2 = 48 c = 0 p2 = 47 c = 1 p2 = 46 c = 1 p2 = 45 c = 1 p2 = 44 c = 1 p2 = 43 c = 2 p2 = 42 c = 2 p2 = 41 c = 2 p2 = 40 c = 2 p2 = 39 c = 2 p2 = 38 c = 2 p2 = 37 c = 3 p2 = 36 c = 3 p2 = 35 c = 3 p2 = 34 c = 3 p2 = 33 c = 3 p2 = 32 c = 3 p2 = 31 c = 4 p2 = 30 c = 4 p2 = 29 c = 4 p2 = 28 c = 4 p2 = 27 c = 4 p2 = 26 c = 4 p2 = 25 c = 4

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

p2 = 479 c = 0 p2 = 478 c = 0 p2 = 477 c = 0 p2 = 476 c = 0 p2 = 475 c = 0 p2 = 474 c = 0 p2 = 473 c = 0 p2 = 472 c = 0 p2 = 471 c = 0 p2 = 470 c = 0 p2 = 469 c = 0 p2 = 468 c = 0 p2 = 467 c = 1 p2 = 466 c = 1 p2 = 465 c = 1 p2 = 464 c = 1 p2 = 463 c = 2 p2 = 462 c = 2 p2 = 461 c = 3 p2 = 460 c = 3 p2 = 459 c = 3 p2 = 458 c = 3 p2 = 457 c = 4 p2 = 456 c = 4 p2 = 455 c = 4 p2 = 454 c = 4 p2 = 453 c = 4 p2 = 452 c = 4 p2 = 451 c = 4 p2 = 450 c = 4 p2 = 449 c = 5 p2 = 448 c = 5 p2 = 447 c = 5 p2 = 446 c = 5 p2 = 445 c = 5 p2 = 444 c = 5 p2 = 443 c = 6 p2 = 442 c = 6 p2 = 441 c = 6 p2 = 440 c = 6 p2 = 439 c = 7 p2 = 438 c = 7 p2 = 437 c = 7 p2 = 436 c = 7 p2 = 435 c = 7 p2 = 434 c = 7 p2 = 433 c = 8 p2 = 432 c = 8 p2 = 431 c = 8 p2 = 430 c = 8 p2 = 429 c = 8 p2 = 428 c = 8 p2 = 427 c = 8 p2 = 426 c = 8 p2 = 425 c = 8 p2 = 424 c = 8 p2 = 423 c = 8 p2 = 422 c = 8 p2 = 421 c = 9 p2 = 420 c = 9 p2 = 419 c = 10 p2 = 418 c = 10 p2 = 417 c = 10 p2 = 416 c = 10 p2 = 415 c = 10 p2 = 414 c = 10 p2 = 413 c = 10 p2 = 412 c = 10 p2 = 411 c = 10 p2 = 410 c = 10 p2 = 409 c = 11 p2 = 408 c = 11 p2 = 407 c = 11 p2 = 406 c = 11 p2 = 405 c = 11 p2 = 404 c = 11 p2 = 403 c = 11 p2 = 402 c = 11 p2 = 401 c = 12 p2 = 400 c = 12 p2 = 399 c = 12 p2 = 398 c = 12 p2 = 397 c = 13 p2 = 396 c = 13 p2 = 395 c = 13 p2 = 394 c = 13 p2 = 393 c = 13 p2 = 392 c = 13 p2 = 391 c = 13 p2 = 390 c = 13 p2 = 389 c = 13 p2 = 388 c = 13 p2 = 387 c = 13 p2 = 386 c = 13 p2 = 385 c = 13 p2 = 384 c = 13 p2 = 383 c = 14 p2 = 382 c = 14 p2 = 381 c = 14 p2 = 380 c = 14 p2 = 379 c = 15 p2 = 378 c = 15 p2 = 377 c = 15 p2 = 376 c = 15 p2 = 375 c = 15 p2 = 374 c = 15 p2 = 373 c = 16 p2 = 372 c = 16 p2 = 371 c = 16 p2 = 370 c = 16 p2 = 369 c = 16 p2 = 368 c = 16 p2 = 367 c = 17 p2 = 366 c = 17 p2 = 365 c = 17 p2 = 364 c = 17 p2 = 363 c = 17 p2 = 362 c = 17 p2 = 361 c = 17 p2 = 360 c = 17 p2 = 359 c = 17 p2 = 358 c = 17 p2 = 357 c = 17 p2 = 356 c = 17 p2 = 355 c = 17 p2 = 354 c = 17 p2 = 353 c = 18 p2 = 352 c = 18 p2 = 351 c = 18 p2 = 350 c = 18 p2 = 349 c = 19 p2 = 348 c = 19 p2 = 347 c = 19 p2 = 346 c = 19 p2 = 345 c = 19 p2 = 344 c = 19 p2 = 343 c = 19 p2 = 342 c = 19 p2 = 341 c = 19 p2 = 340 c = 19 p2 = 339 c = 19 p2 = 338 c = 19 p2 = 337 c = 19 p2 = 336 c = 19 p2 = 335 c = 19 p2 = 334 c = 19 p2 = 333 c = 19 p2 = 332 c = 19 p2 = 331 c = 20 p2 = 330 c = 20 p2 = 329 c = 20 p2 = 328 c = 20 p2 = 327 c = 20 p2 = 326 c = 20 p2 = 325 c = 20 p2 = 324 c = 20 p2 = 323 c = 20 p2 = 322 c = 20 p2 = 321 c = 20 p2 = 320 c = 20 p2 = 319 c = 20 p2 = 318 c = 20 p2 = 317 c = 21 p2 = 316 c = 21 p2 = 315 c = 21 p2 = 314 c = 21 p2 = 313 c = 22 p2 = 312 c = 22 p2 = 311 c = 22 p2 = 310 c = 22 p2 = 309 c = 22 p2 = 308 c = 22 p2 = 307 c = 23 p2 = 306 c = 23 p2 = 305 c = 23 p2 = 304 c = 23 p2 = 303 c = 23 p2 = 302 c = 23 p2 = 301 c = 23 p2 = 300 c = 23 p2 = 299 c = 23 p2 = 298 c = 23 p2 = 297 c = 23 p2 = 296 c = 23 p2 = 295 c = 23 p2 = 294 c = 23 p2 = 293 c = 23 p2 = 292 c = 23 p2 = 291 c = 23 p2 = 290 c = 23 p2 = 289 c = 23 p2 = 288 c = 23 p2 = 287 c = 23 p2 = 286 c = 23 p2 = 285 c = 23 p2 = 284 c = 23 p2 = 283 c = 24 p2 = 282 c = 24 p2 = 281 c = 25 p2 = 280 c = 25 p2 = 279 c = 25 p2 = 278 c = 25 p2 = 277 c = 25 p2 = 276 c = 25 p2 = 275 c = 25 p2 = 274 c = 25 p2 = 273 c = 25 p2 = 272 c = 25 p2 = 271 c = 25 p2 = 270 c = 25 p2 = 269 c = 26 p2 = 268 c = 26 p2 = 267 c = 26 p2 = 266 c = 26 p2 = 265 c = 26 p2 = 264 c = 26 p2 = 263 c = 26 p2 = 262 c = 26 p2 = 261 c = 26 p2 = 260 c = 26 p2 = 259 c = 26 p2 = 258 c = 26 p2 = 257 c = 27 p2 = 256 c = 27 p2 = 255 c = 27 p2 = 254 c = 27 p2 = 253 c = 27 p2 = 252 c = 27 p2 = 251 c = 28 p2 = 250 c = 28 p2 = 249 c = 28 p2 = 248 c = 28 p2 = 247 c = 28 p2 = 246 c = 28 p2 = 245 c = 28 p2 = 244 c = 28 p2 = 243 c = 28 p2 = 242 c = 28 p2 = 241 c = 29 p2 = 240 c = 29