Cody

Solution 1539572

Submitted on 24 May 2018
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 = 2; assert(isequal(sumOfSeriesV(n),s_correct))

ans = 2

2   Fail
n = 3; s_correct = 20; assert(isequal(sumOfSeriesV(n),s_correct))

ans = 2 6 12

Assertion failed.

3   Fail
n = 4; s_correct = 40; assert(isequal(sumOfSeriesV(n),s_correct))

ans = 2 6 12 20

Assertion failed.

4   Fail
n = 10; s_correct = 440; assert(isequal(sumOfSeriesV(n),s_correct))

ans = 2 6 12 20 30 42 56 72 90 110

Assertion failed.

5   Fail
n = 21; s_correct = 3542; assert(isequal(sumOfSeriesV(n),s_correct))

ans = 2 6 12 20 30 42 56 72 90 110 132 156 182 210 240 272 306 342 380 420 462

Assertion failed.

6   Fail
n = 42; s_correct = 26488; assert(isequal(sumOfSeriesV(n),s_correct))

ans = Columns 1 through 15 2 6 12 20 30 42 56 72 90 110 132 156 182 210 240 Columns 16 through 30 272 306 342 380 420 462 506 552 600 650 702 756 812 870 930 Columns 31 through 42 992 1056 1122 1190 1260 1332 1406 1482 1560 1640 1722 1806

Assertion failed.

7   Fail
n = 88; s_correct = 234960; assert(isequal(sumOfSeriesV(n),s_correct))

ans = Columns 1 through 15 2 6 12 20 30 42 56 72 90 110 132 156 182 210 240 Columns 16 through 30 272 306 342 380 420 462 506 552 600 650 702 756 812 870 930 Columns 31 through 45 992 1056 1122 1190 1260 1332 1406 1482 1560 1640 1722 1806 1892 1980 2070 Columns 46 through 60 2162 2256 2352 2450 2550 2652 2756 2862 2970 3080 3192 3306 3422 3540 3660 Columns 61 through 75 3782 3906 4032 4160 4290 4422 4556 4692 4830 4970 5112 5256 5402 5550 5700 Columns 76 through 88 5852 6006 6162 6320 6480 6642 6806 6972 7140 7310 7482 7656 7832

Assertion failed.

8   Fail
n = 99; s_correct = 333300; assert(isequal(sumOfSeriesV(n),s_correct))

ans = Columns 1 through 15 2 6 12 20 30 42 56 72 90 110 132 156 182 210 240 Columns 16 through 30 272 306 342 380 420 462 506 552 600 650 702 756 812 870 930 Columns 31 through 45 992 1056 1122 1190 1260 1332 1406 1482 1560 1640 1722 1806 1892 1980 2070 Columns 46 through 60 2162 2256 2352 2450 2550 2652 2756 2862 2970 3080 3192 3306 3422 3540 3660 Columns 61 through 75 3782 3906 4032 4160 4290 4422 4556 4692 4830 4970 5112 5256 5402 5550 5700 Columns 76 through 90 5852 6006 6162 6320 6480 6642 6806 6972 7140 7310 7482 7656 7832 8010 8190 Columns 91 through 99 8372 8556 8742 8930 9120 9312 9506 9702 9900

Assertion failed.