Cody

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

Solution 1215486

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

Error using catdays Too many input arguments. Error in TestPoint1 (line 3) assert(isequal(catdays(h,m,n),y_correct))

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

Error using catdays Too many input arguments. Error in TestPoint2 (line 3) assert(isequal(catdays(h,m,n),y_correct))

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

Error using catdays Too many input arguments. Error in TestPoint3 (line 3) assert(isequal(catdays(h,m,n),y_correct))

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

Error using catdays Too many input arguments. Error in TestPoint4 (line 3) assert(isequal(catdays(h,m,n),y_correct))

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

Error using catdays Too many input arguments. Error in TestPoint5 (line 3) assert(isequal(catdays(h,m,n),y_correct))

Suggested Problems

More from this Author16

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!