Cody

Solution 2074589

Submitted on 30 Dec 2019 by Vineet Nippani
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 = 10; y = 55; assert(isequal(summation(n),y))

r = 0 r = 1 r = 3 r = 6 r = 10 r = 15 r = 21 r = 28 r = 36 r = 45 r = 55 y = 55

2   Pass
n = 0; y = 0; assert(isequal(summation(n),y))

r = 0 y = 0

3   Pass
n = 17; y = 153; assert(isequal(summation(n),y))

r = 0 r = 1 r = 3 r = 6 r = 10 r = 15 r = 21 r = 28 r = 36 r = 45 r = 55 r = 66 r = 78 r = 91 r = 105 r = 120 r = 136 r = 153 y = 153