

Let’s consider the equation X^2 + 2X + 1 = 0 . We can see that the quadratic equation has no real roots. So we return a pair of -1 i.e. [-1, -1].
1. If the equation has repeated roots, return the roots twice.
2. If there are imaginary roots, return -1 twice.
3. If the root is not an integer, return the greatest integer value less
than the root.
The first line of input contains an integer ‘T’ denoting the number of test cases.
The first and the only line of each test case consists of three single space-separated integers 'A', 'B', and 'C' which denotes the integer coefficients in the polynomial: AX^2 + BX + C = 0.
For each test case, print in a single line two single space-separated integers, denoting the roots of the quadratic equation.
The output of each test case will be printed in a separate line.
You are not required to print anything; it has already been taken care of. Just implement the function and return the answer.
1 <= T <= 10^5
-10^3 <= A, C <= 10^3
-10^4 <= B <= 10^4
A ≠ 0
Time Limit: 1 sec
Since we need to find the roots of the quadratic equation, we can use the well known quadratic formula :
ROOT1 = (-B + sqrt(D)) / 2 * A
ROOT2 = (-B - sqrt(D)) / 2 * A
Where ‘D’ is the discriminant equal to (B ^ 2) - (4 * A * C).
Now depending on the value of ‘D’, we can have the following cases: