結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,220 KB
testcase_01 AC 72 ms
71,428 KB
testcase_02 AC 71 ms
71,252 KB
testcase_03 AC 70 ms
71,352 KB
testcase_04 AC 73 ms
71,244 KB
testcase_05 AC 72 ms
71,756 KB
testcase_06 AC 71 ms
71,976 KB
testcase_07 AC 73 ms
71,724 KB
testcase_08 AC 72 ms
71,724 KB
testcase_09 AC 71 ms
71,696 KB
testcase_10 WA -
testcase_11 AC 70 ms
71,108 KB
testcase_12 AC 72 ms
71,476 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