Greedy Yadu
CodeChefOpen on judge ↗
Yadu is placed in Goldman Sachs. So, he decided to distribute laddoos in his college. There are $N$ number of classes having $A1, A2, A3..., AN$ students. Yadu knows that the number of students in each class is pairwise coprime. He wants to distribute an equal number of laddoos to each student in a particular class (each student will get atleast one laddoo). As Yadu is busy, So he told his friend
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