← All problemsSign in

Chef and his coin game

Chef has completed his all work today and now he is free. So he decided to play coin game with his girlfriend Chefina. Coin game is a game in which each player picks coins from the given N coins in such a way that he can pick any number of coins from 1 to M in one turn and the game continues for both the players. The player who picks the last coin loses the game. It is obvious that both the pla

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