#MTHA0000005. Đóng thùng tối thiểu (Minimum Number of Boxes)
Đóng thùng tối thiểu (Minimum Number of Boxes)
Minimum Number of Boxes
Version: Phuoc Hung OJ Extended
Problem Statement
A warehouse has products to pack into identical boxes. Each box can hold at most products. All products must be packed, and the last box may be partially filled. Determine the minimum number of boxes required.
Input
One line contains two positive integers and .
Output
Print the minimum number of boxes required.
Subtasks
- Subtask 1 (30 points):
- .
- .
- Subtask 2 (70 points):
- .
- .
Examples
Example 1
Input
17 5
Output
4
Explanation
Three boxes hold at most products; products remain, so a fourth box is needed.
Example 2
Input
24 6
Output
4
Explanation
is divisible by , so exactly four full boxes are sufficient.
Example 3
Input
1000000000000 3
Output
333333333334
Explanation
After boxes, products are packed and one remains, so one more box is needed.