← All problemsSign in

The Pizza Bet

Arjun and Sara are best friends and they love pizza (who doesn't). One day they had bet on who can eat more slices of pizza than the other. Arjun and Sara took turns eating $p1$ and $p2$ slices respectively. This kept going until they ran out of money. Each pizza has exactly 6 slices and the turn always starts with Arjun and ends with Sara having the last slice. Find out who ate more slices

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