Cody

Problem 43013. Creating a code via test suite :)

Solution 1706037

Submitted on 11 Jan 2019
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   Fail
x = 4; y = 2; y_correct = 6; assert(isequal(hahaha(x,y),y_correct))

ans = 1 1 1 1 1 2 3 4 1 3 6 10 1 4 10 20 ans = 4

Assertion failed.

2   Fail
x = 5; y = 3; y_correct = 10; assert(isequal(hahaha(x,y),y_correct))

ans = 1 1 1 1 1 1 2 3 4 5 1 3 6 10 15 1 4 10 20 35 1 5 15 35 70 ans = 15

Assertion failed.

3   Fail
x = 10; y = 7; y_correct = 120; assert(isequal(hahaha(x,y),y_correct))

ans = 1 1 1 1 1 1 1 1 1 1 1 2 3 4 5 6 7 8 9 10 1 3 6 10 15 21 28 36 45 55 1 4 10 20 35 56 84 120 165 220 1 5 15 35 70 126 210 330 495 715 1 6 21 56 126 252 462 792 1287 2002 1 7 28 84 210 462 924 1716 3003 5005 1 8 36 120 330 792 1716 3432 6435 11440 1 9 45 165 495 1287 3003 6435 12870 24310 1 10 55 220 715 2002 5005 11440 24310 48620 ans = 5005

Assertion failed.