Cody

Problem 1277. How many days does the cat take to climb out of the hole?

Solution 910740

Submitted on 17 Jun 2016 by Alexander
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
h = 20; m=5; n=3; y_correct = 9; assert(isequal(catdays(h,m,n),y_correct))

y = 9

2   Pass
h = 15; m=6; n=1; y_correct = 3; assert(isequal(catdays(h,m,n),y_correct))

y = 3

3   Pass
h = 25; m=6; n=5; y_correct = 21; assert(isequal(catdays(h,m,n),y_correct))

y = 21

4   Pass
h = 22; m=6; n=5; y_correct = 18; assert(isequal(catdays(h,m,n),y_correct))

y = 18

5   Pass
h = 31; m=8; n=5; y_correct = 9; assert(isequal(catdays(h,m,n),y_correct))

y = 9