← All problemsSign in

The Battle Begins

Sachin, Kishen and Vraj are friends. They like to play a game "BattleMania". In this game, Sachin, Kishen and Vraj can play $a$, $b$ and $c$ battle coins (BTC) respectively. Each round of the game is a battle fought between all players who have more than $0$ BTCs remaining. After playing a round, the BTCs of each and every player who fought in the round decreases by $1$. The rounds continue until

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