#C3153. Budget Allocation
Budget Allocation
Budget Allocation
You are given T test cases. For each test case, you are given two integers: the number of employees N and the total budget B (in dollars). The task is to allocate the budget such that each employee receives an equal share in the swag bags. Formally, let \( S = \lfloor \frac{B}{N} \rfloor \) and let the reserve fund be \( R = B \mod N \). For each test case, output the value of each swag bag and the amount of money kept in the reserve fund.
Note: Use the floor division and modulo operations to compute \( S \) and \( R \) respectively.
inputFormat
The first line contains an integer T indicating the number of test cases. Each of the following T lines contains two space-separated integers N and B representing the number of employees and the total budget respectively.
Constraints:
- 1 \(\leq\) T \(\leq\) 103
- 1 \(\leq\) N, B \(\leq\) 109
outputFormat
For each test case, output a single line with two space-separated integers: the worth in dollars of each swag bag (\( S \)) and the total amount of money in the reserve fund (\( R \)).
## sample3
10 100
7 75
15 20010 0
10 5
13 5
</p>