Cody

Solution 2087526

Submitted on 10 Jan 2020
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
x = 52; y_correct = 12; assert(isequal(Mnum(x),y_correct))

outdeck = Columns 1 through 30 52 50 48 46 44 42 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 1 3 5 7 Columns 31 through 52 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 y = 1

Assertion failed.

2   Fail
x = 10; y_correct = 6; assert(isequal(Mnum(x),y_correct))

outdeck = 10 8 6 4 2 1 3 5 7 9 y = 1

Assertion failed.

3   Fail
x = 9; y_correct = 4; assert(isequal(Mnum(x),y_correct))

outdeck = 8 6 4 2 1 3 5 7 9 y = 1

Assertion failed.

4   Fail
x = 1000; y_correct = 308; assert(isequal(Mnum(x),y_correct))

outdeck = Columns 1 through 15 1000 998 996 994 992 990 988 986 984 982 980 978 976 974 972 Columns 16 through 30 970 968 966 964 962 960 958 956 954 952 950 948 946 944 942 Columns 31 through 45 940 938 936 934 932 930 928 926 924 922 920 918 916 914 912 Columns 46 through 60 910 908 906 904 902 900 898 896 894 892 890 888 886 884 882 Columns 61 through 75 880 878 876 874 872 870 868 866 864 862 860 858 856 854 852 Columns 76 through 90 850 848 846 844 842 840 838 836 834 832 830 828 826 824 822 Columns 91 through 105 820 818 816 814 812 810 808 806 804 802 800 798 796 794 792 Columns 106 through 120 790 788 786 784 782 780 778 776 774 772 770 768 766 764 762 Columns 121 through 135 760 758 756 754 752 750 748 746 744 742 740 738 736 734 732 Columns 136 through 150 730 728 726 724 722 720 718 716 714 712 710 708 706 704 702 Columns 151 through 165 700 698 696 694 692 690 688 686 684 682 680 678 676 674 672 Columns 166 through 180 670 668 666 664 662 660 658 656 654 652 650 648 646 644 642 Columns 181 through 195 640 638 636 634 632 630 628 626 624 622 620 618 616 614 612 Columns 196 through 210 610 608 606 604 602 600 598 596 594 592 590 588 586 584 582 Columns 211 through 225 580 578 576 574 572 570 568 566 564 562 560 558 556 554 552 Columns 226 through 240 550 548 546 544 542 540 538 536 534 532 530 528 526 524 522 Columns 241 through 255 520 518 516 514 512 510 508 506 504 502 500 498 496 494 492 Columns 256 through 270 490 488 486 484 482 480 478 476 474 472 470 468 466 464 462 Columns 271 through 285 460 458 456 454 452 450 448 446 444 442 440 438 436 434 432 Columns 286 through 300 430 428 426 424 422 420 418 416 414 412 410 408 406 404 402 Columns 301 through 315 400 398 396 394 392 390 388 386 384 382 380 378 376 374 372 Columns 316 through 330 370 368 366 364 362 360 358 356 354 352 350 348 346 344 342 Columns 331 through 345 340 338 336 334 332 330 328 326 324 322 320 318 316 314 312 Columns 346 through 360 310 308 306 304 302 300 298 296 294 292 290 288 286 284 282 Columns 361 through 375 280 278 276 274 272 270 268 266 264 262 260 258 256 254 252 Columns 376 through 390 250 248 246 244 242 240 238 236 234 232 230 228 226 224 222 Columns 391 through 405 220 218 216 214 212 210 208 206 204 202 200 198 196 194 192 Columns 406 through 420 190 188 186 184 182 180 178 176 174 172 170 168 166 164 162 Columns 421 through 435 160 158 156 154 152 150 148 146 144 142 140 138 136 134 132 Columns 436 through 450 130 128 126 124 122 120 118 116 114 112 110 108 106 104 102 Columns 451 through 465 100 98 96 94 92 90 88 86 84 82 80 78 76 74 72 Columns 466 through 480 70 68 66 64 62 60 58 56 54 52 50 48 46 44 42 Columns 481 through 495 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 Columns 496 through 510 10 8 6 4 2 1 3 5 7 9 11 13 15 17 19 Columns 511 through 525 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 Columns 526 through 540 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 Columns 541 through 555 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 Columns 556 through 570 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 Columns 571 through 585 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 Columns 586 through 600 171 173 175 177 179 181 183 185 187 189 191 193 195 197 199 Columns 601 through 615 201 203 205 207 209 211 213 215 217 219 221 223 225 227 229 Columns 616 through 630 231 233 235 237 239 241 243 245 247 249 251 253 255 257 259 Columns 631 through 645 261 263 265 267 269 271 273 275 277 279 281 283 285 287 289 Columns 646 through 660 291 293 295 297 299 301 303 305 307 309 311 313 315 317 319 Columns 661 through 675 321 323 325 327 329 331 333 335 337 339 341 343 345 347 349 Columns 676 through 690 351 353 355 357 359 361 363 365 367 369 371 373 375 377 379 Columns 691 through 705 381 383 385 387 389 391 393 395 397 399 401 403 405 407 409 Columns 706 through 720 411 413 415 417 419 421 423 425 427 429 431 433 ...

Assertion failed.

5   Fail
x = 100; y_correct = 33; assert(isequal(Mnum(x),y_correct))

outdeck = Columns 1 through 30 100 98 96 94 92 90 88 86 84 82 80 78 76 74 72 70 68 66 64 62 60 58 56 54 52 50 48 46 44 42 Columns 31 through 60 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 1 3 5 7 9 11 13 15 17 19 Columns 61 through 90 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 Columns 91 through 100 81 83 85 87 89 91 93 95 97 99 y = 1

Assertion failed.

6   Pass
x = 2; y_correct = 2; assert(isequal(Mnum(x),y_correct))

outdeck = 2 1 outdeck = 1 2 y = 2

7   Fail
x = 17; y_correct = 5; assert(isequal(Mnum(x),y_correct))

outdeck = 16 14 12 10 8 6 4 2 1 3 5 7 9 11 13 15 17 y = 1

Assertion failed.