Suppose in an infinitely long line, the hare is standing in position 0.

From that place, it can jump either in the +ve direction or in the -ve [but not both].

One condition is that, in i-th jump, it can move i step. Meaning -

0
1  [1st step >> so 0+1]
3  [2nd step >> so 1+2]
6
10

Given a position x, determine whether the hare will be in that position or not.

For example,

 if x=15 then true 
 if x=14 then false.

Similar problem https://www.mathworks.com/matlabcentral/cody/problems/45347-cat-s-paw-01

Solution Stats

167 Solutions

54 Solvers

Last Solution submitted on May 24, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...