You have an ancient coffee cup excavated from the "COBOOOL remains", boiled water, and ground coffee. Let's brew a cup of coffee from those with an appropriate concentration.
You have three kinds of operations to brew coffee.
1.Pour "A" grams of boiled water to the cup.
2.Add "B" grams of ground coffee to the cup and stir.
3.For tasting, drink "C" grams of content in the cup.
When you have A grams of boiled water and B grams of ground coffee, after the each operation, the amounts of boiled water and ground coffee in the cup varies as follows:
|
Operation 1
《Pouring boiled water》
|
Operation 2
《Adding ground coffee》
|
Operation 3
《Tasting》
|
Boiled water |
X+A |
X |
X-C*X/(X+Y) |
Ground coffee |
Y |
Y+B |
Y-C*Y/(X+Y) |
You are given the operations. Find the concentration of the coffee after the all operations. Truncate a fractional part of the value. Note: For X grams of boiled water and Y grams of ground coffee, you can calculate the concentration (percentage) of the coffee as: 100*Y/(X+Y)
The following figure shows the content of the cup at example 2.
In this example, as the cup hold about 62.9 gram of boiled water and about 47.1 grams of ground coffee. So, the answer is 42 .