Cartons And Balls
CodeChefOpen on judge ↗
Chef and his friend is playing a game. They have $K$ empty cartons and $N$ balls with them where $N$ is a multiple of $K$ and they need to fill it up with balls. They both can fill $K$ balls in a box in one minute but both of them have different style of filling. Chef puts one ball in each box whereas his friend chooses a box at random having the least number of balls in it and puts $K$ balls int
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