← All problemsSign in

Game of Choice

Ram and Shyam are two bitter rivals. Each one of them can't stand a defeat against the other. Today they are playing a game .$Game$ $of$ $Choice$. The rules of the games are as follows. - Initially Ram has a number $x \geq 5$ and Shyam has a number $y \geq 5$. - In one turn of the game, both Ram and Shyam choose a number $2$ or $5$ independently of the other person and subtract their cur

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