← All problemsSign in

Republic Day

On the eve of Republic Day, Teacher decided to distribute candies among N students.She brought the candies in a box and placed it in front of students. She allowed every student to take out some candies. But each one of them tried to take out as much candies as possible. That's why, Not all students were happy. She called all students and requested for their bags of candies. Now she wants to di

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