|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||512 MB||0||0||0||0.000%|
You have just started your military service with the border guards. Since you are a Computer Science graduate, they asked you to implement a schedule for the soldiers. Initially no soldier is on duty and you need the schedule to satisfy 2 requirements:
Given N and K, the system will calculate the maximum guaranteed number of soldiers to be on duty at any given time.
Your program will be tested on one or more test cases. The first line of the input will be a single integer T, the number of test cases (1 ≤ T ≤ 100).
Each test case consists of a line containing 2 space separated integers:
For each test case, print a single line containing the maximum guaranteed number of soldiers on duty at any given time.
3 4 1 9 3 21 3
2 6 15