結果

問題 No.1179 Quadratic Equation
ユーザー stngstng
提出日時 2022-09-24 18:04:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 191 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 71,892 KB
最終ジャッジ日時 2023-08-24 00:32:05
合計ジャッジ時間 2,203 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,420 KB
testcase_01 AC 73 ms
71,584 KB
testcase_02 AC 74 ms
71,464 KB
testcase_03 AC 75 ms
71,272 KB
testcase_04 AC 74 ms
71,300 KB
testcase_05 AC 72 ms
71,880 KB
testcase_06 AC 75 ms
71,680 KB
testcase_07 AC 72 ms
71,580 KB
testcase_08 AC 73 ms
71,472 KB
testcase_09 AC 72 ms
71,892 KB
testcase_10 WA -
testcase_11 AC 72 ms
71,220 KB
testcase_12 AC 73 ms
71,380 KB
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c = map(int,input().split())
tmp = b**2-4*a*c
if tmp < 0:
    print("imaginary")
    exit()

if tmp == 0:
    print(-b/(2*a))
else:
    print((-b-(tmp**0.5))/(2*a), (-b+(tmp**0.5))/(2*a))
0