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

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

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

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

4  Pass 
n = 30;
t = 465;
assert(isequal(triangle(n),t))
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

1840 Solvers
762 Solvers
247 Solvers
159 Solvers
347 Solvers