結果

問題 No.1179 Quadratic Equation
ユーザー tktk_snsntktk_snsn
提出日時 2020-08-21 22:29:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 235 bytes
コンパイル時間 75 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 43,964 KB
最終ジャッジ日時 2024-04-23 06:10:20
合計ジャッジ時間 9,159 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 530 ms
43,568 KB
testcase_02 AC 529 ms
43,584 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 545 ms
43,592 KB
testcase_06 AC 529 ms
43,848 KB
testcase_07 AC 546 ms
43,564 KB
testcase_08 AC 540 ms
43,820 KB
testcase_09 AC 534 ms
43,708 KB
testcase_10 AC 529 ms
43,964 KB
testcase_11 AC 532 ms
43,568 KB
testcase_12 AC 532 ms
43,836 KB
testcase_13 AC 529 ms
43,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
a, b, c = map(int, input().split())

if b * b < 4 * a * c:
    print("Imaginary")
else:
    x, y = np.roots([a, b, c])
    if x == y:
        print(x)
    elif x > y:
        print(y, x)
    else:
        print(x, y)
0