

Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 100 点
問題文
地上 x メートルの高さから見える水平線は \sqrt{x(12800000+x)} メートル先にあるとするとき、 地上 H メートルの高さから見える水平線が何メートル先にあるか求めてください。
制約
- 1 \leq H \leq 10^5
- H は整数である
入力
入力は以下の形式で標準入力から与えられる。
H
出力
答えを出力せよ。
なお、想定解との絶対誤差または相対誤差が 10^{-6} 以下であれば、正解として扱われる。
入力例 1
333
出力例 1
65287.907678222
\sqrt{333(12800000+333)} = 65287.9076782\ldots です。65287.91
などの出力でも正解となります。
入力例 2
634
出力例 2
90086.635834623
\sqrt{634(12800000+634)} = 90086.6358346\ldots です。
Score : 100 points
Problem Statement
Assuming that the horizon seen from a place x meters above the ground is \sqrt{x(12800000+x)} meters away, find how many meters away the horizon seen from a place H meters above the ground is.
Constraints
- 1 \leq H \leq 10^5
- H is an integer.
Input
Input is given from Standard Input in the following format:
H
Output
Print the answer.
Your answer will be considered correct when the absolute or relative error from the judge's answer is at most 10^{-6}.
Sample Input 1
333
Sample Output 1
65287.907678222
We have \sqrt{333(12800000+333)} = 65287.9076782\ldots. Outputs such as 65287.91
would also be accepted.
Sample Input 2
634
Sample Output 2
90086.635834623
We have \sqrt{634(12800000+634)} = 90086.6358346\ldots.