a006. 一元二次方程式
Tags : 數學
Accepted rate : 41013人/43628人 ( 94% ) [非即時]
評分方式:
Tolerant

最近更新 : 2020-01-02 11:00

Content

求一元二次方程式 ax2+bx+c=0 的根

Input

每組輸入共一行,內含三個整數 a, b, c 以空白隔開。

Output

Two different roots x1=?? , x2=??

Two same roots x=??

No real root

PS: 答案均為整數,若有兩個根則大者在前

Sample Input #1
1 3 -10
Sample Output #1
Two different roots x1=2 , x2=-5
Sample Input #2
1 0 0
Sample Output #2
Two same roots x=0
Sample Input #3
1 1 1
Sample Output #3
No real root
測資資訊:
記憶體限制: 512 MB
公開 測資點#0 (20%): 1.0s , <1K
公開 測資點#1 (20%): 1.0s , <1K
公開 測資點#2 (20%): 1.0s , <1K
公開 測資點#3 (20%): 1.0s , <1K
公開 測資點#4 (20%): 1.0s , <1K
Hint :
Tags:
數學
出處:


ID User Problem Subject Hit Post Date
35177 CodingPrep(演算法/資料結構教學) a006
C++ 答案
172 2023-05-14 17:58
35122 qqazwwsxeedc...(Jackis666) a006
c++
132 2023-05-10 11:31
34851 yp11151151@y...(704-36陳祈佑) a006
esay
759 2023-04-21 13:21
34820 fxxkuyt@gmai...(apcs搶到台北場不難吧...) a006
300 2023-04-19 01:48
34671 yodayo(余) a006
326 2023-04-06 20:26