Preparando MOJI

Quadratic equation

2000ms 262144K

Description:

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.

Input:

The only line of input contains integers A, B and C ( - 1000 ≤ A, B, C ≤ 1000, A ≠ 0), separated by spaces.

Output:

Output 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.

Sample Input:

1 -2 1

Sample Output:

1

Sample Input:

1 0 -1

Sample Output:

-1 1

Sample Input:

2 -3 1

Sample Output:

0.5 1

Informação

Codeforces

Provedor Codeforces

Código CF530A

Tags

*special

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 08:57:17

Relacionados

Nada ainda