結果

問題 No.1179 Quadratic Equation
ユーザー H3PO4H3PO4
提出日時 2020-08-21 22:08:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 212 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 45,092 KB
最終ジャッジ日時 2024-04-23 05:55:47
合計ジャッジ時間 7,384 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 474 ms
44,056 KB
testcase_01 AC 448 ms
44,944 KB
testcase_02 AC 451 ms
45,092 KB
testcase_03 AC 442 ms
44,320 KB
testcase_04 AC 445 ms
43,932 KB
testcase_05 WA -
testcase_06 AC 456 ms
44,948 KB
testcase_07 AC 453 ms
44,828 KB
testcase_08 WA -
testcase_09 AC 449 ms
44,936 KB
testcase_10 AC 458 ms
45,064 KB
testcase_11 AC 450 ms
44,976 KB
testcase_12 AC 451 ms
44,956 KB
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

A, B, C = map(int, input().split())
if (D := B ** 2 - 4 * A * C) < 0:
    print('imaginary')
else:
    x1, x2 = np.roots([A, B, C])
    if D:
        print(x1, x2)
    else:
        print(x1)
0