Cody

Problem 45426. The Tortoise and the Hare - 02

Solution 2197920

Submitted on 7 Apr 2020 by Binbin Qi
  • Size: 37
  • This is the leading solution.
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
assert(isequal(rabbit(8),4))

2   Pass
assert(isequal(rabbit(18),7))

3   Pass
assert(isequal(rabbit(-600),35))

4   Pass
assert(isequal(rabbit(6600),115))

5   Pass
assert(isequal(rabbit(99999),449))

6   Pass
assert(isequal(rabbit(-16),7))

7   Pass
assert(isequal(rabbit(45237929),9513))

8   Pass
assert(isequal(rabbit(46),11))

Suggested Problems

More from this Author149

Community Treasure Hunt

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

Start Hunting!