結果

問題 No.1179 Quadratic Equation
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-07-26 22:53:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 217 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 8,116 KB
最終ジャッジ日時 2023-09-11 05:09:54
合計ジャッジ時間 1,585 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,904 KB
testcase_01 WA -
testcase_02 AC 17 ms
7,804 KB
testcase_03 AC 16 ms
8,056 KB
testcase_04 AC 17 ms
8,068 KB
testcase_05 AC 16 ms
8,080 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 16 ms
7,872 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 16 ms
7,912 KB
testcase_12 WA -
testcase_13 AC 17 ms
7,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import sqrt
a, b, c = map(int, input().split())
if b ** 2 - 4 * a * c < 0:
    print("imaginary")
else:
    print(*set([(-b + sqrt(b ** 2 - 4 * a * c)) / (2 * a), (-b - sqrt(b ** 2 - 4 * a * c)) / (2 * a)]))
0