Problem 45425. The Tortoise and the Hare - 01

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 -

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

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

Solution Stats

29.9% Correct | 70.1% Incorrect
Last Solution submitted on Jun 10, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers27

Suggested Problems

More from this Author165

Problem Tags

Community Treasure Hunt

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

Start Hunting!