CF2013A.Zhan's Blender

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Zhan's Blender

Today, a club fair was held at "NSPhM". In order to advertise his pastry club, Zhan decided to demonstrate the power of his blender.

To demonstrate the power of his blender, Zhan has nn fruits.

The blender can mix up to xx fruits per second.

In each second, Zhan can put up to yy fruits into the blender. After that, the blender will blend min(x,c)\min(x, c) fruits, where cc is the number of fruits inside the blender. After blending, blended fruits are removed from the blender.

Help Zhan determine the minimum amount of time required for Zhan to blend all fruits.

Input

Each test contains multiple test cases. The first line contains the number of test cases tt (1t10001 \le t \le 1000). The description of the test cases follows.

The first line of each test case contains one integer nn (0n1090 \le n \le 10^9) — the number of fruits Zhan has.

The second line of each test case contains two integers xx and yy (1x,y1091 \le x, y \le 10^9) — the number of fruits the blender can blend per second and the number of fruits Zhan can put into the blender per second.

Output

For each testcase, output a single integer — the minimum number of seconds to blend all fruits.

Note

In the first example, you can first put 22 fruits in the blender. After that, the blender will mix these 22 fruits, and in the end, there will be 00 fruits left in the blender. Then you can put 33 fruits into the blender, after which the blender will mix these 33 fruits.

In the second example, you can put 11 fruit into the blender 33 times.

In the third example, you can first put 33 fruits into the blender, then add another 33 fruits.

Samples

5
5
3 4
3
1 2
6
4 3
100
4 3
9
3 3
2
3
2
34
3

在线编程 IDE

建议全屏模式获得最佳体验