← All problemsSign in

Let us play a Game

Chef and his friend are playing a very unusual game. There is an integer n. Also, there are 3 more integers namely a b c. This is a 2-player game. On every turn, a player can make any of the following moves: Move 1->n=n-a Move 2->n=n-b. Move 3->n=n-c. The player who can make n=0 in any of his turns wins. Also, if a player cannot decrease n further without making it negative, the other player

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