#36133: python解答


tomhung1996@gmail.com (洪維澤)


a,b,c = map(int,input().split())                                   #輸入abc

z = b**2-4*a*c                                                          #判別式
x1 = (-b+(z**0.5))/2*a                                               #根1
x2 = (-b-(z**0.5))/2*a                                                #根2

if z > 0 :                                                                                                                      #判別式>0 兩個根
  print('Two different roots x1='+str(int(x1))+' , x2='+str(int(x2)))                              #str(int(x1)) 將float轉成int(去小數點)再轉成str(去空格)
elif z == 0:                                                                                                                  #判別式=0 重根
  print('Two same roots x='+str(int(x1)))
else:
  print('No real root')

#36507: Re: python解答


s11132132@nhsh.tp.edu.tw (10837劉千慈)


你錯了 廢物