```python import math def solve_quadratic_equation(a, b, c): discriminant = b2 - 4*a*c if discriminant < 0: print("方程无实根!") else: root1 = (-b + math.sqrt(discriminant)) / (2*a) root2 = (-b - math.sqrt(discriminant)) / (2*a) if root1 == root2: print("方程有两个相等的实根:x=" + str(root1)) else: print("方程有两个不同的实根:x1=" + str(root1) + ",x2=" + str(root2)) a, b, c = map(int, input().split()) solve_quadratic_equation(a, b, c) ``` [2024-09-27 23:09:46 | AI写代码神器 | 191点数解答]