#K95102. Optimal Car Allocation

    ID: 38789 Type: Default 1000ms 256MiB

Optimal Car Allocation

Optimal Car Allocation

You are given several test cases. In each test case, there are two integers: ( m ) (the number of friends) and ( n ) (the seating capacity of a car). Your task is to compute the minimum number of cars required to accommodate all friends. Each car can seat at most ( n ) friends, so the minimum number of cars needed is calculated by the ceiling of ( \frac{m}{n} ), i.e., ( \lceil \frac{m}{n} \rceil ).

Make sure your program reads from standard input and writes the answer to standard output, with each test case result on a new line.

inputFormat

The first line contains an integer ( t ) representing the number of test cases. Each of the following ( t ) lines contains two integers separated by a space: ( m ) and ( n ) — the number of friends and the seating capacity of a single car respectively.

outputFormat

For each test case, output the minimum number of cars required. Each result should be printed on a separate line.## sample

3
12 5
9 4
6 3
3

3 2

</p>