← All problemsSign in

Chocolate Fiasco

Chef wants to give his 2 children chocolates for christmas. He has ordered chocolates from his friend who has a terrible habit of packing unequal number of chocolates in each box. The next day, Chef receives N boxes with Ci chocolates in each box (1 < i < N). Chef cannot be unfair to his children and wants to give each of them equal chocolates. Hence, he decides to group boxes such that the num

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