Cody

# Problem 44466. The twelve days of Christmas

Solution 1706074

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   Pass

2   Fail
day = 0 - randi(50); accumulatedGifts = 0; assert( isequal(twelvetide(day), accumulatedGifts) )

ans = 153

Assertion failed.

3   Pass

ans = 0

4   Pass

ans = 1

5   Fail

ans = 3

Assertion failed.

6   Fail

ans = 6

Assertion failed.

7   Fail

ans = 10

Assertion failed.

8   Fail

ans = 15

Assertion failed.

9   Fail

ans = 21

Assertion failed.

10   Fail

ans = 28

Assertion failed.

11   Fail

ans = 36

Assertion failed.

12   Fail

ans = 45

Assertion failed.

13   Fail

ans = 55

Assertion failed.

14   Fail

ans = 66

Assertion failed.

15   Fail

ans = 78

Assertion failed.

16   Fail

ans = 91

Assertion failed.

17   Fail

ans = 5050

Assertion failed.

18   Fail
for i = 1 : 10 day = 12 + randi(300); accumulatedGifts = 364; assert( isequal(twelvetide(day), accumulatedGifts) ) end;

ans = 30628

Assertion failed.