Legacy
CodeChefOpen on judge ↗
Introduction Old MacBeetle, having made quite a fortune on the trade in munitions from his many factories, decided at last to head into his well-deserved retirement and devote himself completely to growing radishes – his true passion. Before doing so, however, he must hand over the reins to the younger generation. MacBeetle intends to divide all of his factories fairly between his N sons. With th
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