← All problemsSign in

Pack the balls in a box!

CodeChefRating 2873Open on judge ↗

Suppose we have a set of balls and a large cuboid box, with a rectangle as its base. The box has a fixed size at the base, but we can choose its height. We would like to place all the balls within the box, and at the same time try to minimize its height. Input First, 2 integers, 10 ≤ a,b ≤ 100 - the dimensions of the rectangular base of the box. Then, an integer 1 ≤ n ≤ 10000, representing the n

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