A. Zhan‘s Blender

time limit per test

1 second

memory limit per test

256 megabytes

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 (1≤t≤10001≤t≤1000). The description of the test cases follows.

The first line of each test case contains one integer nn (0≤n≤1090≤n≤109) --- the number of fruits Zhan has.

The second line of each test case contains two integers xx and yy (1≤x,y≤1091≤x,y≤109) --- 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.

Example

Input

Copy

复制代码

5

5

3 4

3

1 2

6

4 3

100

4 3

9

3 3

Output

Copy

复制代码
2
3
2
34
3

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.

2

解题说明:此题是一道模拟题,根据题目意思每次可以混合min(x,y)种水果,直到全部处理完为止。

cpp 复制代码
#include <iostream>
#include<algorithm>
using namespace std;

typedef long long ll;

int main()
{
	ll t;
	cin >> t;
	while (t--)
	{
		ll n, x, y;
		cin >> n >> x >> y;
		ll mn = min(x, y);
		ll cnt = n / mn;
		if (n % mn != 0)
		{
			cnt++;
		}
		cout << cnt << endl;
	}
	return 0;
}
相关推荐
Young soul21 天前
blender操作手册
blender
CG_MAGIC2 天前
Blender实用插件精选汇总
blender·效果图渲染·渲云渲染·blender插件介绍·blender插件汇总·blender插件使用·blender渲染
成都渲染101云渲染66664 天前
三维制图软件哪个最好用?主流 3D 建模软件深度对比(2025)
3d·ue5·图形渲染·blender·maya·houdini
是lamune4 天前
blender新手入门--常用的各类插件详细介绍
blender
陶甜也5 天前
使用Blender进行现代建筑3D建模:前端开发者的跨界探索
前端·3d·blender
CG_MAGIC5 天前
Blender3D 环境氛围感营造全攻略:从场景搭建到光影渲染
3d·3dsmax·blender·效果图·建模教程·渲云
狮智先生5 天前
【学习笔记】利用blender生成的mesh模型(ply格式)并不是水密的
笔记·学习·blender
田里的水稻6 天前
DT_digitalTwin_blender中机器人骨骼建模
机器人·blender
成都渲染101云渲染66669 天前
C4D 云渲染平台哪个好?价格、速度、稳定性全网真实对比(含渲染101)
ue5·图形渲染·blender·maya·houdini
CG_MAGIC9 天前
云渲染时代的选择:Blender与KeyShot对比及指南
3d·blender·效果图渲染·建模教程·渲云渲染·keyshot