Cody

# Problem 44466. The twelve days of Christmas

Solution 1706075

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 = 364

Assertion failed.

3   Fail

ans = 364

Assertion failed.

4   Fail

ans = 364

Assertion failed.

5   Fail

ans = 364

Assertion failed.

6   Fail

ans = 364

Assertion failed.

7   Fail

ans = 364

Assertion failed.

8   Fail

ans = 364

Assertion failed.

9   Fail

ans = 364

Assertion failed.

10   Fail

ans = 364

Assertion failed.

11   Fail

ans = 364

Assertion failed.

12   Fail

ans = 364

Assertion failed.

13   Fail

ans = 364

Assertion failed.

14   Fail

ans = 364

Assertion failed.

15   Pass

ans = 364

16   Fail

Index exceeds the number of array elements (13). Error in twelvetide (line 3) ans(max(13,d+1)) Error in Test16 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

17   Fail