Python3 代码
import math
n = input().split()
a = float(n[0])
b = float(n[1])
c = float(n[2])
d = b*b - 4*a*c
if not a or d < 0:
print ("Impossivel calcular")
else:
a *=2
r1 = (-b + math.sqrt(d))/a
r2 = (-b - math.sqrt(d))/a
print ("R1 =", f'{r1:.5f}')
print ("R2 =", f'{r2:.5f}')