Cody

Solution 1910437

Submitted on 23 Aug 2019 by Sivakumar Selvam
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
x = 1; y_correct = 1; assert(isequal(vecsum(x),y_correct))

c = 1

2   Pass
x = [1 2 3 5]; y_correct = 11; assert(isequal(vecsum(x),y_correct))

c = 1 c = 3 c = 6 c = 11

3   Pass
x = [1 2 3 5]; y_correct = 11; assert(isequal(vecsum(x),y_correct))

c = 1 c = 3 c = 6 c = 11

4   Pass
x = 1:100; y_correct = 5050; assert(isequal(vecsum(x),y_correct))

c = 1 c = 3 c = 6 c = 10 c = 15 c = 21 c = 28 c = 36 c = 45 c = 55 c = 66 c = 78 c = 91 c = 105 c = 120 c = 136 c = 153 c = 171 c = 190 c = 210 c = 231 c = 253 c = 276 c = 300 c = 325 c = 351 c = 378 c = 406 c = 435 c = 465 c = 496 c = 528 c = 561 c = 595 c = 630 c = 666 c = 703 c = 741 c = 780 c = 820 c = 861 c = 903 c = 946 c = 990 c = 1035 c = 1081 c = 1128 c = 1176 c = 1225 c = 1275 c = 1326 c = 1378 c = 1431 c = 1485 c = 1540 c = 1596 c = 1653 c = 1711 c = 1770 c = 1830 c = 1891 c = 1953 c = 2016 c = 2080 c = 2145 c = 2211 c = 2278 c = 2346 c = 2415 c = 2485 c = 2556 c = 2628 c = 2701 c = 2775 c = 2850 c = 2926 c = 3003 c = 3081 c = 3160 c = 3240 c = 3321 c = 3403 c = 3486 c = 3570 c = 3655 c = 3741 c = 3828 c = 3916 c = 4005 c = 4095 c = 4186 c = 4278 c = 4371 c = 4465 c = 4560 c = 4656 c = 4753 c = 4851 c = 4950 c = 5050