import math a = float(input("a = ")) b = float(input("b = ")) c = float(input("c = ")) delta = pow(b, 2) - 4 * a * c if delta > 0 : x1 = (- b + math.sqrt(delta)) / (2 * a) x2 = (- b - math.sqrt(delta)) / (2 * a) print("x1 = {:.2f},x2 = {:.2f}".format(x1,x2)) elif delta == 0: x1 = (- b + math.sqrt(delta)) / (2 * a) print("x1=x2 = {:.2f}".format(x1)) else: print("方程没有实数根")