Battle of Coins
CodeChefOpen on judge ↗
Sam & his brother Andrew are playing a game known as the Battle of Coins. For this, Sam has created a stack of random coins. Sam and his brother will take turns one by one, and Sam goes first. On each turn, the person whose turn it is can take out 1 to 4 coins from the stack. The one who removes the last coin is the winner. Given N, the number of coins in the stack, print “True” if Sam can win t
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.
Sign in to chat with the tutor and save your progress.
Sign in to start