My cat gets out 1 day earlier on cases 3 and 4, by a claw. He reaches 25 on day 20.
I stand by my test case answers for 3 and 4 as the cat must be clear or above the hole to escape.
Hi RIchard, sorry if my conditions are a bit restrictive and you are quite clever to have realised it could be a day earlier for those test cases. Perhaps my problem is unnecessarily restrictive so if others feel the same I will revise it. :)
There are also the feelings of the cat to consider--whether it is fair to force him to spend an extra day undergoing an experiment of questionable benefit to science (and no obvious benefit to cats).
Tic Tac Toe FTW
Project Euler: Problem 6, Natural numbers, squares and sums.
Back to basics 11 - Max Integer
Multiples of a Number in a Given Range
Solving Quadratic Equations (Version 1)
Pythagorean perfect squares: find the square of the hypotenuse and the length of the other side
Similar Triangles - find the height of the tree
How long do each of the stages of the rocket take to burn?
Create a square matrix of multiples
Solve the set of simultaneous linear equations
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office