結果

問題 No.1179 Quadratic Equation
ユーザー chineristAC
提出日時 2020-08-21 22:46:50
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 237 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-10-15 06:03:33
合計ジャッジ時間 1,379 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 3 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import sqrt

a,b,c=map(int,input().split())

if b**2-4*a*c<0:
    print("imaginary")
elif b**2-4*a*c==0:
    print(-b/(2*a))
else:
    p1=-b+sqrt(b**2-4*a*c)
    p2=-b-sqrt(b**2-4*a*c)
    q=2*a
    print(p1/q)
    print(p2/q)
0