~/algor $ cat problems/if-kvadrat-tenglama-ildizlari
Roots of a quadratic equation
Medium
1000 ms
64 MB
44%
Integers $a$, $b$ and $c$ are given ($a \ne 0$). Find the real roots of the quadratic equation:
$$a * x^{2} + b * x + c = 0$$
Input
One line with three integers: $a$, $b$ and $c$.
Output
The first line is the number of roots: $0$, $1$ or $2$. If there are roots, the second line has them in ascending order, each with exactly 3 digits after the decimal point (for example, 1.000 2.000). If there are no roots, the second line is not printed. If a rounded result is zero (for example, $-0.0001$), print 0.000 (not -0.000).
Note
$-1000 \le a, b, c \le 1000$
$a \ne 0$
Examples
Input #1
1 -3 2
Output #1
2 1.000 2.000
Input #2
1 2 5
Output #2
0