Cody

Solution 1614992

Submitted on 23 Aug 2018 by Srishti Saha
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
filetext = fileread('your_fcn_name.m'); assert(isempty(strfind(filetext, 'sqrt'))) assert(isempty(strfind(filetext, 'for')))

2   Pass
n= 6880; y_correct = 24; assert(isequal(your_fcn_name(n),y_correct))

D = Columns 1 through 15 1 2 4 5 8 10 16 20 32 40 43 80 86 160 172 Columns 16 through 24 215 344 430 688 860 1376 1720 3440 6880 y = 24

3   Pass
n= 5050; y_correct = 12; assert(isequal(your_fcn_name(n),y_correct))

D = 1 2 5 10 25 50 101 202 505 1010 2525 5050 y = 12

4   Pass
n= 188325; y_correct = 36; assert(isequal(your_fcn_name(n),y_correct))

D = Columns 1 through 15 1 3 5 9 15 25 27 31 45 75 81 93 135 155 225 Columns 16 through 30 243 279 405 465 675 775 837 1215 1395 2025 2325 2511 4185 6075 6975 Columns 31 through 36 7533 12555 20925 37665 62775 188325 y = 36

5   Pass
n= 76576500; y_correct = 576; assert(isequal(your_fcn_name(n),y_correct))

D = Columns 1 through 15 1 2 3 4 5 6 7 9 10 11 12 13 14 15 17 Columns 16 through 30 18 20 21 22 25 26 28 30 33 34 35 36 39 42 44 Columns 31 through 45 45 50 51 52 55 60 63 65 66 68 70 75 77 78 84 Columns 46 through 60 85 90 91 99 100 102 105 110 117 119 125 126 130 132 140 Columns 61 through 75 143 150 153 154 156 165 170 175 180 182 187 195 198 204 210 Columns 76 through 90 220 221 225 231 234 238 250 252 255 260 273 275 286 300 306 Columns 91 through 105 308 315 325 330 340 350 357 364 374 375 385 390 396 420 425 Columns 106 through 120 429 442 450 455 462 468 476 495 500 510 525 546 550 561 572 Columns 121 through 135 585 595 612 630 650 660 663 693 700 714 715 748 750 765 770 Columns 136 through 150 780 819 825 850 858 875 884 900 910 924 935 975 990 1001 1020 Columns 151 through 165 1050 1071 1092 1100 1105 1122 1125 1155 1170 1190 1260 1275 1287 1300 1309 Columns 166 through 180 1326 1365 1375 1386 1428 1430 1500 1530 1540 1547 1575 1625 1638 1650 1683 Columns 181 through 195 1700 1716 1750 1785 1820 1870 1925 1950 1980 1989 2002 2100 2125 2142 2145 Columns 196 through 210 2210 2244 2250 2275 2310 2340 2380 2431 2475 2550 2574 2618 2625 2652 2730 Columns 211 through 225 2750 2772 2805 2860 2925 2975 3003 3060 3094 3150 3250 3276 3300 3315 3366 Columns 226 through 240 3465 3500 3570 3575 3740 3825 3850 3900 3927 3978 4004 4095 4125 4250 4284 Columns 241 through 255 4290 4420 4500 4550 4620 4641 4675 4862 4875 4950 5005 5100 5148 5236 5250 Columns 256 through 270 5355 5460 5500 5525 5610 5775 5850 5950 6006 6188 6300 6375 6435 6500 6545 Columns 271 through 285 6630 6732 6825 6930 7140 7150 7293 7650 7700 7735 7854 7875 7956 8190 8250 Columns 286 through 300 8415 8500 8580 8925 9009 9100 9282 9350 9625 9724 9750 9900 9945 10010 10500 Columns 301 through 315 10710 10725 11050 11220 11375 11550 11700 11781 11900 12012 12155 12375 12750 12870 13090 Columns 316 through 330 13260 13650 13860 13923 14025 14300 14586 14625 14875 15015 15300 15470 15708 15750 16380 Columns 331 through 345 16500 16575 16830 17017 17325 17850 17875 18018 18564 18700 19125 19250 19500 19635 19890 Columns 346 through 360 20020 20475 21420 21450 21879 22100 22750 23100 23205 23375 23562 24310 24750 25025 25500 Columns 361 through 375 25740 26180 26775 27300 27625 27846 28050 28875 29172 29250 29750 30030 30940 31500 32175 Columns 376 through 390 32725 33150 33660 34034 34125 34650 35700 35750 36036 36465 38250 38500 38675 39270 39780 Columns 391 through 405 40950 42075 42900 43758 44625 45045 45500 46410 46750 47124 48620 49500 49725 50050 51051 Columns 406 through 420 53550 53625 55250 55692 56100 57750 58500 58905 59500 60060 60775 64350 65450 66300 68068 Columns 421 through 435 68250 69300 69615 70125 71500 72930 75075 76500 77350 78540 81900 82875 84150 85085 86625 Columns 436 through 450 87516 89250 90090 92820 93500 98175 99450 100100 102102 102375 107100 107250 109395 110500 115500 Columns 451 through 465 116025 117810 121550 125125 128700 130900 133875 136500 139230 140250 145860 150150 153153 154700 160875 Columns 466 through 480 163625 165750 168300 170170 173250 178500 180180 182325 193375 196350 198900 204204 204750 210375 214500 Columns 481 through 495 218790 225225 232050 235620 243100 248625 250250 255255 267750 278460 280500 294525 300300 303875 306306 Columns 496 through 510 321750 327250 331500 340340 346500 348075 364650 375375 386750 392700 409500 420750 425425 437580 450450 Columns 511 through 525 464100 490875 497250 500500 510510 535500 546975 580125 589050 607750 612612 643500 654500 696150 729300 Columns 526 through 540 750750 765765 773500 841500 850850 900900 911625 981750 994500 1021020 1093950 1126125 1160250 1178100 1215500 Columns 541 through 555 1276275 1392300 1472625 1501500 1531530 1701700 1740375 1823250 1963500 2127125 2187900 2252250 2320500 2552550 2734875 Columns 556 through 570 2945250 3063060 3480750 3646500 3828825 4254250 4504500 5105100 5469750 5890500 6381375 6961500 7657650 8508500 10939500 Columns 571 through 576 12762750 15315300 19144125 25525500 38288250 76576500 y = 576

6   Pass
n= 74; y_correct = 4; assert(isequal(your_fcn_name(n),y_correct))

D = 1 2 37 74 y = 4

7   Pass
n=14^8 ; y_correct = 81; assert(isequal(your_fcn_name(n),y_correct))

y = 81

8   Pass
n=314721 ; y_correct = 27; assert(isequal(your_fcn_name(n),y_correct))

D = Columns 1 through 15 1 3 9 11 17 33 51 99 121 153 187 289 363 561 867 Columns 16 through 27 1089 1683 2057 2601 3179 6171 9537 18513 28611 34969 104907 314721 y = 27

Suggested Problems

More from this Author12