You like the sound of rain only if the sound ranges from \(l\) to \(r\) units. Every cloud makes \(s\) unit of sound. Determine the minimum and the maximum number of clouds that can produce the sound in the provided range.
Input format
- First line: One integer \(T\) denoting the number of test cases
- Next \(T\) lines: Three integers \(l, r,\) and \(s\) denoting the provided range of the rain sound and the units of sound produced by each cloud
Output format
In \(T\) lines, print two space-separated integers that represent the minimum and the maximum number of the clouds that can produce the sound in the provided range.
Note: Print \(-1 -1\) if no answer is available.
Constraints
\(1 \leq T \leq 10^{5}\\ 1 \leq l \leq r \leq 10^{9}\\ 1 \leq s \leq 10^{9}\)
In the first test of the sample the answer is $$2 3$$ because $$2\cdot3 = 6$$ which is in $$[5,10]$$ and $$3\cdot3 = 9$$ which is also in $$[5,10]$$. Also $$4\cdot3 = 12$$ which exceeds Parmis's interval and is considered noise.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor