G - 方程式 解説 /

実行時間制限: 2 sec / メモリ制限: 1024 MB

配点 : 6

問題文

方程式 a x^5 + bx + c=0 は次の条件を満たすとします。

  • 1\lt x \lt 2 の範囲に解をただ 1 つ持つ

1\lt x \lt 2 を満たす方程式の解を計算してください。

制約

  • 1 \leq a \leq 10^9
  • 1 \leq b \leq 10^9
  • -10^9 \leq c \leq 10^9
  • 入力は全て整数
  • 与えられた方程式は、1\lt x \lt 2 の範囲に解をただ 1 つ持つ

入力

入力は以下の形式で標準入力から与えられる。

a b c

出力

答えを出力せよ。
想定解答との絶対誤差または相対誤差が 10^{-9} 以下であれば正解と判定される。


入力例 1

32 2 -246

出力例 1

1.500000000000000000

x = 1.5 のとき、ax^5+bx+c=32\times(1.5)^5 + 2\times1.5 - 246 = 0 を満たします。


入力例 2

12 3 -45

出力例 2

1.279562760087743278

Score : 6 points

Problem Statement

Assume that the equation a x^5 + bx + c=0 satisfies the condition below.

  • It has exactly one solution in the interval 1\lt x \lt 2.

Find the solution of the equation in the interval 1\lt x \lt 2.

Constraints

  • 1 \leq a \leq 10^9
  • 1 \leq b \leq 10^9
  • -10^9 \leq c \leq 10^9
  • All values in input are integers.
  • The given equation has exactly one solution in the interval 1\lt x \lt 2.

Input

Input is given from Standard Input in the following format:

a b c

Output

Print the answer. Your output will be judged as correct when its absolute or relative error from the judge's answer is at most 10^{-9}.


Sample Input 1

32 2 -246

Sample Output 1

1.500000000000000000

For x = 1.5, we have ax^5+bx+c=32\times(1.5)^5 + 2\times1.5 - 246 = 0.


Sample Input 2

12 3 -45

Sample Output 2

1.279562760087743278