eolymp
bolt
Try our new interface for solving problems
Problems

Ternary search

Ternary search

Find the minimum of a function $f(x) = x^2 + ax + b$. \InputFile Two integers $a$ and $b~(|a|, |b| \le 10^6)$. \OutputFile Print the value of $x$ where the function $f(x)$ is minimal. Print the answer with $2$ decimal digits. It is known that $|x| \le 100$.
Time limit 1 second
Memory limit 128 MiB
Input example #1
-2 -35
Output example #1
1.00
Author Mykhailo Medvediev