← All problemsSign in

Game of hopscotch

The chef being an inventor decides to play a game of hopscotch. He designs a new version of this game in which there are N rows having discontinuous values in them. To win this game a person needs to reach the end of the row, in K jumps. Jumps can be back or forth. The number of steps he is skipping at a time depends upon the prime divisor of the value of the row he is standing on. Help Chef to de

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