#C2350. Taco Trips

    ID: 45657 Type: Default 1000ms 256MiB

Taco Trips

Taco Trips

In this problem, you are tasked with calculating the minimum number of trips required to transport a given number of tacos. You are provided with two integers for each test case: ( M ) which represents the total number of tacos, and ( N ) which represents the maximum number of tacos that can be carried in one trip. The answer for each test case is given by the formula:

[ \text{trips} = \lceil \frac{M}{N} \rceil ]

If ( M = 0 ), then no trips are required. You need to process multiple test cases with input provided via standard input and output the result for each case on a new line.

inputFormat

Input is read from standard input. The first line contains an integer ( T ) representing the number of test cases. Each of the following ( T ) lines contains two space-separated integers ( M ) and ( N ), where ( M ) is the total number of tacos and ( N ) is the maximum capacity per trip.

outputFormat

For each test case, output a single line with the minimum number of trips needed to transport all tacos.## sample

4
10 3
15 5
8 2
6 6
4

3 4 1

</p>