Today, a club fair was held at "NSPhM". In order to advertise his pastry club, Zhan…
- User
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 n fruits.
The blender can mix up to x fruits per second.
In each second, Zhan can put up to y fruits into the blender. After that, the blender will blend min(x,c) fruits, where c 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 t (1≤t≤1000 ). The description of the test cases follows.
The first line of each test case contains one integer n (0≤n≤109 ) — the number of fruits Zhan has.
The second line of each test case contains two integers x and y (1≤x,y≤109 ) — the number of fruits Zhan can put into the blender per second and the number of fruits the blender can blend per second.
Output For each testcase, output a single integer — the minimum number of seconds to blend all fruits.
- Assistant
To solve this problem, we need to find the minimum time required to blend all ( n ) fruits considering the constraints given:
- Zhan can put up to ( y ) fruits into the blender per second.
- The blender can blend up to ( x ) fruits per second.
Here's a step-by-step explanation:
Observation 1: In each second, the blender can blend (\min(x, c)) fruits, where ( c ) is the number of fruits in the blender. Since we want to minimize the time, we'll aim to keep the blender blending as many fruits as possible each second.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.