Cody

Solution 1940712

Submitted on 18 Sep 2019 by Ngo Minh Ngoc
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 = 1; s_correct = 1; assert(isequal(sumOfSeriesII(n),s_correct))

s = 0 a = 1 s = 1

2   Pass
n = 2; s_correct = 10; assert(isequal(sumOfSeriesII(n),s_correct))

s = 0 a = 1 s = 1 a = 9 s = 10

3   Pass
n = 3; s_correct = 35; assert(isequal(sumOfSeriesII(n),s_correct))

s = 0 a = 1 s = 1 a = 9 s = 10 a = 25 s = 35

4   Pass
n = 4; s_correct = 84; assert(isequal(sumOfSeriesII(n),s_correct))

s = 0 a = 1 s = 1 a = 9 s = 10 a = 25 s = 35 a = 49 s = 84

5   Pass
n = 5; s_correct = 165; assert(isequal(sumOfSeriesII(n),s_correct))

s = 0 a = 1 s = 1 a = 9 s = 10 a = 25 s = 35 a = 49 s = 84 a = 81 s = 165

6   Pass
n = 11; s_correct = 1771; assert(isequal(sumOfSeriesII(n),s_correct))

s = 0 a = 1 s = 1 a = 9 s = 10 a = 25 s = 35 a = 49 s = 84 a = 81 s = 165 a = 121 s = 286 a = 169 s = 455 a = 225 s = 680 a = 289 s = 969 a = 361 s = 1330 a = 441 s = 1771

7   Pass
n = 42; s_correct = 98770; assert(isequal(sumOfSeriesII(n),s_correct))

s = 0 a = 1 s = 1 a = 9 s = 10 a = 25 s = 35 a = 49 s = 84 a = 81 s = 165 a = 121 s = 286 a = 169 s = 455 a = 225 s = 680 a = 289 s = 969 a = 361 s = 1330 a = 441 s = 1771 a = 529 s = 2300 a = 625 s = 2925 a = 729 s = 3654 a = 841 s = 4495 a = 961 s = 5456 a = 1089 s = 6545 a = 1225 s = 7770 a = 1369 s = 9139 a = 1521 s = 10660 a = 1681 s = 12341 a = 1849 s = 14190 a = 2025 s = 16215 a = 2209 s = 18424 a = 2401 s = 20825 a = 2601 s = 23426 a = 2809 s = 26235 a = 3025 s = 29260 a = 3249 s = 32509 a = 3481 s = 35990 a = 3721 s = 39711 a = 3969 s = 43680 a = 4225 s = 47905 a = 4489 s = 52394 a = 4761 s = 57155 a = 5041 s = 62196 a = 5329 s = 67525 a = 5625 s = 73150 a = 5929 s = 79079 a = 6241 s = 85320 a = 6561 s = 91881 a = 6889 s = 98770

8   Pass
n = 71; s_correct = 477191; assert(isequal(sumOfSeriesII(n),s_correct))

s = 0 a = 1 s = 1 a = 9 s = 10 a = 25 s = 35 a = 49 s = 84 a = 81 s = 165 a = 121 s = 286 a = 169 s = 455 a = 225 s = 680 a = 289 s = 969 a = 361 s = 1330 a = 441 s = 1771 a = 529 s = 2300 a = 625 s = 2925 a = 729 s = 3654 a = 841 s = 4495 a = 961 s = 5456 a = 1089 s = 6545 a = 1225 s = 7770 a = 1369 s = 9139 a = 1521 s = 10660 a = 1681 s = 12341 a = 1849 s = 14190 a = 2025 s = 16215 a = 2209 s = 18424 a = 2401 s = 20825 a = 2601 s = 23426 a = 2809 s = 26235 a = 3025 s = 29260 a = 3249 s = 32509 a = 3481 s = 35990 a = 3721 s = 39711 a = 3969 s = 43680 a = 4225 s = 47905 a = 4489 s = 52394 a = 4761 s = 57155 a = 5041 s = 62196 a = 5329 s = 67525 a = 5625 s = 73150 a = 5929 s = 79079 a = 6241 s = 85320 a = 6561 s = 91881 a = 6889 s = 98770 a = 7225 s = 105995 a = 7569 s = 113564 a = 7921 s = 121485 a = 8281 s = 129766 a = 8649 s = 138415 a = 9025 s = 147440 a = 9409 s = 156849 a = 9801 s = 166650 a = 10201 s = 176851 a = 10609 s = 187460 a = 11025 s = 198485 a = 11449 s = 209934 a = 11881 s = 221815 a = 12321 s = 234136 a = 12769 s = 246905 a = 13225 s = 260130 a = 13689 s = 273819 a = 14161 s = 287980 a = 14641 s = 302621 a = 15129 s = 317750 a = 15625 s = 333375 a = 16129 s = 349504 a = 16641 s = 366145 a = 17161 s = 383306 a = 17689 s = 400995 a = 18225 s = 419220 a = 18769 s = 437989 a = 19321 s = 457310 a = 19881 s = 477191

9   Pass
n = 123; s_correct = 2481115; assert(isequal(sumOfSeriesII(n),s_correct))

s = 0 a = 1 s = 1 a = 9 s = 10 a = 25 s = 35 a = 49 s = 84 a = 81 s = 165 a = 121 s = 286 a = 169 s = 455 a = 225 s = 680 a = 289 s = 969 a = 361 s = 1330 a = 441 s = 1771 a = 529 s = 2300 a = 625 s = 2925 a = 729 s = 3654 a = 841 s = 4495 a = 961 s = 5456 a = 1089 s = 6545 a = 1225 s = 7770 a = 1369 s = 9139 a = 1521 s = 10660 a = 1681 s = 12341 a = 1849 s = 14190 a = 2025 s = 16215 a = 2209 s = 18424 a = 2401 s = 20825 a = 2601 s = 23426 a = 2809 s = 26235 a = 3025 s = 29260 a = 3249 s = 32509 a = 3481 s = 35990 a = 3721 s = 39711 a = 3969 s = 43680 a = 4225 s = 47905 a = 4489 s = 52394 a = 4761 s = 57155 a = 5041 s = 62196 a = 5329 s = 67525 a = 5625 s = 73150 a = 5929 s = 79079 a = 6241 s = 85320 a = 6561 s = 91881 a = 6889 s = 98770 a = 7225 s = 105995 a = 7569 s = 113564 a = 7921 s = 121485 a = 8281 s = 129766 a = 8649 s = 138415 a = 9025 s = 147440 a = 9409 s = 156849 a = 9801 s = 166650 a = 10201 s = 176851 a = 10609 s = 187460 a = 11025 s = 198485 a = 11449 s = 209934 a = 11881 s = 221815 a = 12321 s = 234136 a = 12769 s = 246905 a = 13225 s = 260130 a = 13689 s = 273819 a = 14161 s = 287980 a = 14641 s = 302621 a = 15129 s = 317750 a = 15625 s = 333375 a = 16129 s = 349504 a = 16641 s = 366145 a = 17161 s = 383306 a = 17689 s = 400995 a = 18225 s = 419220 a = 18769 s = 437989 a = 19321 s = 457310 a = 19881 s = 477191 a = 20449 s = 497640 a = 21025 s = 518665 a = 21609 s = 540274 a = 22201 s = 562475 a = 22801 s = 585276 a = 23409 s = 608685 a = 24025 s = 632710 a = 24649 s = 657359 a = 25281 s = 682640 a = 25921 s = 708561 a = 26569 s = 735130 a = 27225 s = 762355 a = 27889 s = 790244 a = 28561 s = 818805 a = 29241 s = 848046 a = 29929 s = 877975 a = 30625 s = 908600 a = 31329 s = 939929 a = 32041 s = 971970 a = 32761 s = 1004731 a = 33489 s = 1038220 a = 34225 s = 1072445 a = 34969 s = 1107414 a = 35721 s = 1143135 a = 36481 s = 1179616 a = 37249 s = 1216865 a = 38025 s = 1254890 a = 38809 s = 1293699 a = 39601 s = 1333300 a = 40401 s = 1373701 a = 41209 s = 1414910 a = 42025 s = 1456935 a = 42849 s = 1499784 a = 43681 s = 1543465 a = 44521 s = 1587986 a = 45369 s = 1633355 a = 46225 s = 1679580 a = 47089 s = 1726669 a = 47961 s = 1774630 a = 48841 s = 1823471 a = 49729 s = 1873200 a = 50625 s = 1923825 a = 51529 s = 1975354 a = 52441 s = 2027795 a = 53361 s = 2081156 a = 54289 s = 2135445 a = 55225 s = 2190670 a = 56169 s = 2246839 a = 57121 s = 2303960 a = 58081 s = 2362041 a = 59049 s = 2421090 a = 60025 s = 2481115

Suggested Problems

More from this Author9