Ответсообщение недоступно
a = float(input())
b = float(input())
c = float(input())
if a == 0:
if b == 0 and c == 0:
print('Infinite solutions')
elif b == 0 and c != 0:
print('No solution')
elif b != 0 and c == 0:
print(f'{c:.3}')
elif b != 0 and c != 0:
x = -c / b
print(f'{x:.3}')
elif a != 0:
if b != 0:
if c == 0:
x = -b / a
if x < 0:
print(f'{x:.3} {c:.3}')
elif x > 0:
print(f'{c:.3} {x:.3}')
elif c != 0:
D = b * b - 4 * a * c
if D > 0:
x1 = (-b + D ** (1 / 2)) / (2 * a)
x2 = (-b - D ** (1 / 2)) / (2 * a)
if x1 > x2:
print(f'{x2:.3} {x1:.3}')
elif x1 < x2:
print(f'{x1:.3} {x2:.3}')
elif x1 == x2:
print(f'{x1:.3}')
elif D == 0:
x = -b / 2 / a
print(f'{x:.3}')
elif D < 0:
print('No solution')
if b == 0:
if c == 0:
print(f'{c:.3}')
elif c != 0:
x1 = (-c / a) ** (1 / 2)
x2 = -(-c / a) ** (1 / 2)
if x1 > x2:
print(f'{x2:.3} {x1:.3}')
elif x1 < x2:
print(f'{x1:.3} {x2:.3}')