At the Bottles and Port Company, you produce and bottle only the finest of vintages. To satisfy the desires of your highly exclusive clientele, it is necessary to study what happens to your wines once a new bottle is opened. When that happens, liquids in the bottle immediately start evaporating. The alcohol in the bottle evaporates at a different rate than the other liquids in the bottle, meaning that over time, the delicate balance of the port wine will be disturbed.
Your goal is to compute how the alcohol percentage changes in the days after opening a fresh bottle. By placing the opened bottle in an advanced chemical apparatus, you are able to measure how fast each liquid in the bottle evaporates.
The input consists of:
Output the alcohol percentage after leaving the bottle open for $$$d$$$ days.
Your answer should have an absolute or relative error of at most $$$10^{-6}$$$.
23 81 1
14.2857142857143
511 892 1
1.17647058823529
1010 401 1
0
1040 100 3
100