結果
問題 | No.1179 Quadratic Equation |
ユーザー | H3PO4 |
提出日時 | 2020-08-21 22:10:07 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 221 bytes |
コンパイル時間 | 173 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 45,212 KB |
最終ジャッジ日時 | 2024-04-23 05:56:29 |
合計ジャッジ時間 | 8,836 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 536 ms
44,056 KB |
testcase_01 | RE | - |
testcase_02 | AC | 536 ms
45,064 KB |
testcase_03 | AC | 537 ms
44,316 KB |
testcase_04 | AC | 537 ms
44,188 KB |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | AC | 534 ms
45,212 KB |
testcase_12 | RE | - |
testcase_13 | RE | - |
ソースコード
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(*sorted(x1, x2)) else: print(x1)