#41272: python


suyueh (suyueh)

學校 : 不指定學校
編號 : 272111
來源 : [125.228.45.241]
最後登入時間 :
2025-06-02 18:21:06

import math
a, b, c = map(int, input().split())
d = b**2 - 4*a*c
if d > 0:
  x1 = (-b + math.sqrt(d)) // (2*a)
  x2 = (-b - math.sqrt(d)) // (2*a)
  print("Two different roots x1="+str(round(x1))+" , "+"x2="+str(round(x2)))
elif d == 0:
  x = -b // (2*a)
  print("Two same roots x="+str(x))
else:
  print("No real root")