Write a program that solves for the root of a univariate polynomial with a maximum degree of
Input Specification
Line
The next
Terms will always be collected (i.e. exponents will not be repeated) and arranged in descending powers.
Output Specification
In order from lowest value to highest value, every real solution for when the polynomial is equal to zero.
Your answer must be accurate within
If there are no real solutions to the equation, output NO REAL ROOTS
.
Note: Coefficients and answers can have up to long double
.
Sample Input 1
2
2 3
-54 0
Sample Output 1
3
Explanation for Sample Output 1
This asks for the solution(s) of
Sample Input 2
3
3 2
4 1
-20 0
Sample Output 2
-3.33333
2
Explanation for Sample Output 2
This asks for the solution(s) of
Comments
so real its complex