Cody

Solution 1896860

Submitted on 10 Aug 2019 by zeinab mousaviyan
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))

t = 1 y = 1

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

t = 1 t = 3 t = 6 t = 11 y = 11

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

t = 1 t = 3 t = 6 t = 11 y = 11

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

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