#K35272. Sarah's Running Laps Calculator
Sarah's Running Laps Calculator
Sarah's Running Laps Calculator
Sarah wants to reach a daily running distance of D units. However, she can only complete whole laps of her track, each of length L units. Your task is to determine the minimum number of complete laps Sarah must run in order to cover at least D units. Mathematically, if we denote the required number of laps by N, then
\( N = \lceil\frac{D}{L}\rceil \)
where \(\lceil x \rceil\) represents the ceiling function that rounds x up to the nearest integer.
Implement a program that reads the input from standard input (stdin) and outputs the result to standard output (stdout). Each test case consists of two integers D and L provided on one line. The first input line contains the integer T - the number of test cases.
inputFormat
The input is given via standard input and is formatted as follows:
- The first line contains an integer T, representing the number of test cases.
- Each of the next T lines contains two space-separated integers D and L, where D is the daily target distance and L is the length of one lap.
outputFormat
For each test case, output a single integer on a new line representing the minimum number of complete laps required such that the total distance is at least D.
## sample4
5 2
9 3
10 10
12 5
3
3
1
3
</p>