#K7521. Minimum Number of Buses
Minimum Number of Buses
Minimum Number of Buses
In this problem, you are given several test cases. Each test case consists of three integers: (M), (T), and (S), where (M) represents the number of students, (T) represents the number of teachers, and (S) represents the seating capacity of a bus. Your task is to determine the minimum number of buses required to transport all the individuals in each test case. The number of buses needed for each test case can be calculated using the formula:\ [ \text{buses} = \left\lceil \frac{M + T}{S} \right\rceil ] where (\lceil x \rceil) denotes the ceiling of (x).
inputFormat
The input is read from standard input (stdin). The first line contains a single integer (k), representing the number of test cases. Each of the following (k) lines contains three space-separated integers: (M) (the number of students), (T) (the number of teachers), and (S) (the seating capacity of one bus).
outputFormat
For each test case, output a single line containing the minimum number of buses required. The output should be written to standard output (stdout).## sample
4
40 5 50
35 6 10
100 20 30
50 2 18
1
5
4
3
</p>