t | from math import * | t | from math import * |
| | | |
| a, b, c = eval(input()) | | a, b, c = eval(input()) |
| d = b ** 2 - 4 * a * c | | d = b ** 2 - 4 * a * c |
| if d < 0 or a == b == 0 and c != 0: | | if d < 0 or a == b == 0 and c != 0: |
| print(0) | | print(0) |
| elif a == b == c == 0: | | elif a == b == c == 0: |
| print(-1) | | print(-1) |
| elif d == 0: | | elif d == 0: |
| print(-b / (2 * a)) | | print(-b / (2 * a)) |
| else: | | else: |
| x1 = (-b + sqrt(d)) / (2 * a) | | x1 = (-b + sqrt(d)) / (2 * a) |
| x2 = (-b - sqrt(d)) / (2 * a) | | x2 = (-b - sqrt(d)) / (2 * a) |
| if x1 < x2: | | if x1 < x2: |
| print(x1, x2) | | print(x1, x2) |
| else: | | else: |
| print(x2, x1) | | print(x2, x1) |
| | | |