#K6236. Minimum Drone Trips
Minimum Drone Trips
Minimum Drone Trips
You are given a set of packages that need to be delivered by drones. Each drone can carry a limited number of packages per trip. Your task is to determine the minimum number of trips required to deliver all packages for each test case.
For a given test case with N packages and a drone capacity of C, the minimum number of trips required is given by the formula: $$\lceil \frac{N}{C} \rceil$$. Note that if N is 0, then the number of trips is 0.
Read the input from standard input (stdin) and output the result for each test case to standard output (stdout), each on a new line.
inputFormat
The first line of input contains an integer T, denoting the number of test cases. This is followed by T lines, each containing two space-separated integers:
N
: The total number of packages.C
: The capacity of the drone (maximum packages per trip).
You can assume that C
is greater than or equal to 1.
outputFormat
For each test case, output a single line containing the minimum number of trips required. The result for each test case is computed using the formula: $$\lceil \frac{N}{C} \rceil$$
## sample4
10 3
25 5
50 50
7 1
4
5
1
7
</p>