We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Cats and a Mouse
Cats and a Mouse
Sort by
recency
|
1254 Discussions
|
Please Login in order to post a comment
java (8)
Here is my c++ solution, you can watch the explanation here : https://youtu.be/vbV5-DqJU74
Short version
if abs(x-z)==abs(y-z): return "Mouse C" elif(abs(x-z)>abs(y-z)): return "Cat B"
else: return "Cat A"
Python solution