|
Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб. Question by Ibrahim Mesecan.
The roots of a quadratic equation
Shqip
Question: In elementary algebra,
quadratic expressions are represented
in the form
Then, its discriminant is calculated using
the following formula
According to the value of discriminant,
there are three cases:
- If the discriminant is zero, then, there is one
real root.
-
If the discriminant is positive, then, there are two distinct
real roots.
- If the discriminant is negative, then,
there are no real roots.
Write a program that gets three integers and then,
calculates and shows the roots.
Input specification
You will be given three integers which are between
-1000 and 1000.
Output specification
- If there is no real root show the message "No real root".
- If there is one real root, show it with
two digits precision.
- If there are two roots, show them with
2 digits precision in the order given above.
Sample Input I |
Sample Input II |
1 2 1 |
2 3 4 |
Sample Output I |
Sample Output II |
-1 |
No real root
|
Для отправки решений необходимо выполнить вход.
|