Cody

# Problem 44466. The twelve days of Christmas

Solution 1706073

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

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test2 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

3   Fail

ans = 0

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test3 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

4   Fail

ans = 1

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test4 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

5   Fail

ans = 3

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test5 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

6   Fail

ans = 6

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test6 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

7   Fail

ans = 10

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test7 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

8   Fail

ans = 15

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test8 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

9   Fail

ans = 21

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test9 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

10   Fail

ans = 28

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test10 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

11   Fail

ans = 36

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test11 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

12   Fail

ans = 45

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test12 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

13   Fail

ans = 55

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test13 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

14   Fail

ans = 66

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test14 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

15   Fail

ans = 78

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test15 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

16   Fail

ans = 91

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test16 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

17   Fail

ans = 5050

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test17 (line 3) assert( isequal(twelvetide(day), accumulatedGifts) )

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

ans = 16471

Output argument "accumulatedGifts" (and maybe others) not assigned during call to "twelvetide". Error in Test18 (line 4) assert( isequal(twelvetide(day), accumulatedGifts) )