← All problemsSign in

Binary Power Game

Ram plays a strange number game. There are $N$ blocks numbered from $1$ to $N$. At the beginning of game ram is at $N$th block and he wants to come at $1$st block to win the game in minimum number of moves. In one move, he can perform one of the following operations 1. If the number is power of two then divide it by $2$ and that becomes the new position of Ram 2. If not then reduce it by the next

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