Coopers and Square
CodeChefOpen on judge ↗
Marie and George Cooper had 3 children. Like every other child, they had a demand and at the start of each financial year Marie allocates a specific amount to each of them as follows: - Smallest and Smartest one, Sheldon gets $m$ dollars. - Second one, Missy gets $(m-1)$ dollars. - Third and eldest one, Georgie gets $(m-2)$ dollars. George wants to spend money $z$, but George will only spend mo
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