Second degree equation
Statement
Goal
Solve a second degree equationTips :
Remember these equations below
_ (-b - √Δ) / (2a) and (-b + √Δ) / (2a).
_ -b / (2a).
Input
Line 1 : An integer a, the first coefficient.
Line 2 : An integer b, the second coefficient.
Line 3 : An integer c, the third coefficient.
Line 2 : An integer b, the second coefficient.
Line 3 : An integer c, the third coefficient.
Output
If Δ > 0, print the two solutions s1 and s2 separated by one space.
If Δ = 0, print the only solutions1 .
If Δ < 0, print"No solution" .
Note : The output must be rounded to 2 digits after the comma.
If Δ = 0, print the only solution
If Δ < 0, print
Note : The output must be rounded to 2 digits after the comma.
Constraints
a ≠ 0
Example
Input
1 -3 2
Output
2.00 1.00
Game modes
Fastest
Test cases
Test 1 Test
Input
1
-3
2
Output
2.00 1.00
Validator 1 Validator
Input
23
-4
0
Output
0.17 0.00
Test 2 Test
Input
4
19
-5
Output
0.25 -5.00
Validator 2 Validator
Input
-298
2
9
Output
-0.17 0.18
Test 3 Test
Input
4
12
9
Output
-1.50
Validator 3 Validator
Input
-2
4
-2
Output
1.00
Test 4 Test
Input
19
6
45
Output
No solution
Validator 4 Validator
Input
41
93
77
Output
No solution
Test 5 Test
Input
8
77
-2
Output
0.03 -9.65
Validator 5 Validator
Input
7
0
-9
Output
1.13 -1.13
Solution language
Solution
Stub generator input