← All problemsSign in

LOCATE JERRY!

Tom was running behind jerry and he was about to catch Jerry, suddenly Jerry entered a tunnel, which follows a specefic pattern, if we take initial point of tunnel as (0,0) on a plane and write all non-integer 0,1,2..... we get a staircase pattern as shown in the figure. For ex. we locate 1,2 ,3 points as (1,1),(2,0) and (3,1) respectively and follow this pattern continuously 8 16 7 13 6 121

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start