No.379 Five-Yen Coin
タグ : / 解いたユーザー数 468
作問者 :
LayCurse
Problem Statement
You are contemplating suicide by gas.
Each time you insert $1$ five-yen coin, $G \; \mathrm{mg}$ of gas comes out.
You currently have $N$ yen and can exchange money freely.
The volume of your room is $V \; \mathrm{m}^3$.
For simplicity, assuming that no gas leaks out of the room, at most how many $\mathrm{mg}$ of gas per $1 \; \mathrm{m^3}$ can you fill the room with?
Input
$N$ $G$ $V$
$1 \leq N, G, V \leq 1000000000 = 10^9$
$N, G, V$ are integers
Output
Output a real number representing the answer.
Your answer is considered correct if its relative error or absolute error is at most $10^{-12}$.
Sample
Sample 1
Input
100 500 10
Output
1000
Since you have $100$ yen, you can obtain $5$-yen coins, $20$ of them.
Also, each $5$-yen coin, per $1$ coin, releases $500 \; \mathrm{mg}$ of gas, so a total of $10000 \; \mathrm{mg}$ of gas can be released.
The volume of the room is $10 \; \mathrm{m}^3$, so the concentration is $1000 \; \mathrm{mg}/\mathrm{m}^3$.
Sample 2
Input
187456612 84877661 9498174
Output
335030261.51740765571594238281
You may output any number of digits (within reason), but note that the relative error or absolute error must be at most $10^{-12}$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。