← All problemsSign in

Number game

Arpit & Nikhil were bored from their usual routine of studying, so they decided to play a game. The game was as follows - Given a number N the player must subtract 1, 2 or 3 from N in order to make a number that is divisble by 4. The game will continue until any player is able to make such a number, the corresponding player to make the number wins. Nikhil allows Arpit to start the game but on

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