302728: CF530A. Quadratic equation
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
A. Quadratic equationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output
You are given a quadratic equation with integer coefficients A * X2 + B * X + C = 0. It is guaranteed that A ≠ 0 and that the equation has at least one real root. Output the roots of the equation.
InputThe only line of input contains integers A, B and C ( - 1000 ≤ A, B, C ≤ 1000, A ≠ 0), separated by spaces.
OutputOutput the roots of the equation in increasing order. If the equation has a single root of multiplicity 2, output it once. The root is considered to be correct if its absolute or relative error does not exceed 10 - 4.
ExamplesInput1 -2 1Output
1Input
1 0 -1Output
-1 1Input
2 -3 1Output
0.5 1