Three Numbers
Chef has three numbers $A, B,$ and $C$. He can do the following type of operation: - Select two numbers amongst $A, B,$ and $C$; - Add $1$ to the selected numbers; - Subtract $1$ from the remaining number. Determine whether Chef can make all the three numbers **equal** after applying the above operation any number of times. If yes, output the **minimum** number of operations required by Chef.
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