Cody

Solution 1864695

Submitted on 3 Jul 2019 by Timothy Allen
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 = 1; t = 1; assert(isequal(triangle(n),t))

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

n = 5 n = 6

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

n = 9 n = 12 n = 14 n = 15

4   Pass
n = 30; t = 465; assert(isequal(triangle(n),t))

n = 59 n = 87 n = 114 n = 140 n = 165 n = 189 n = 212 n = 234 n = 255 n = 275 n = 294 n = 312 n = 329 n = 345 n = 360 n = 374 n = 387 n = 399 n = 410 n = 420 n = 429 n = 437 n = 444 n = 450 n = 455 n = 459 n = 462 n = 464 n = 465