This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Just the sum of 1 to n
Test  Status  Code Input and Output 

1  Pass 
n = 1;
t = 1;
assert(isequal(triangle(n),t))
sum =
0
sum =
1

2  Pass 
n = 3;
t = 6;
assert(isequal(triangle(n),t))
sum =
0
sum =
1
sum =
3
sum =
6

3  Pass 
n = 5;
t = 15;
assert(isequal(triangle(n),t))
sum =
0
sum =
1
sum =
3
sum =
6
sum =
10
sum =
15

4  Pass 
n = 30;
t = 465;
assert(isequal(triangle(n),t))
sum =
0
sum =
1
sum =
3
sum =
6
sum =
10
sum =
15
sum =
21
sum =
28
sum =
36
sum =
45
sum =
55
sum =
66
sum =
78
sum =
91
sum =
105
sum =
120
sum =
136
sum =
153
sum =
171
sum =
190
sum =
210
sum =
231
sum =
253
sum =
276
sum =
300
sum =
325
sum =
351
sum =
378
sum =
406
sum =
435
sum =
465

First nonzero element in each column
418 Solvers
199 Solvers
162 Solvers
159 Solvers
332 Solvers