Codeforces Round 1064 (Div. 2)
B
Tab Closing
Codeforces
900
原题
← AC →
翻译中…

You've been staring at your computer screen for too long; it is time to give it a break and go touch some grass.

翻译中…

Your screen is a line of length $a$, and there are $n$ tabs displayed on it. You want to close all of the tabs by clicking on the x's at their right endpoint.

翻译中…

Every tab is a segment of length $\textrm{len}=\min(b,\frac{a}{m})$, where $m$ is the number of remaining tabs. The tabs are always tightly arranged in sequence from the left endpoint of the screen; that is, the x's will be at $\textrm{len},2\cdot \textrm{len},3\cdot \textrm{len},\ldots,m\cdot\textrm{len}$ units away from the left endpoint. Please note that the length of each tab will change as you are closing tabs.

翻译中…

Now your cursor is at the left endpoint of the screen. You wonder what the minimum number of times you need to move the mouse to close all tabs is.

翻译中…

If you have difficulty understanding the statement, you may also refer to your browser tab for a visualization, or click here.

翻译中…

Input

翻译中…

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 10^4$). The description of the test cases follows.

翻译中…

Each test case is a line of three integers $a$, $b$, and $n$ ($1\le b\le a \le 10^9$, $1\le n \le 10^9$).

翻译中…

Output

翻译中…

For each test case, output a single integer — the minimum number of times you need to move the mouse to close all tabs.

翻译中…

Note

翻译中…

In the first test case, a possible course of action is to move your cursor to $1$ and press $6$ times.

翻译中…

In the second test case, a possible course of action is to move your cursor to $4.5$ and press once, then move it to $6$ and press again. It can be proved that the tabs cannot be closed with less than $2$ moves.

翻译中…

样例

Input #1
12
8 1 6
9 6 2
10 3 1
10 1 10
9 2 1
5 5 6
6 2 7
9 1 9
3 2 6
8 1 7
8 1 9
8 2 4
Output #1
1
2
1
1
1
1
2
1
2
1
2
1
InputCopy OutputCopy
题目信息
题号
2166B
时间限制
1.5 s
内存限制
256 MB
标签
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。