結果
問題 |
No.550 夏休みの思い出(1)
|
ユーザー |
![]() |
提出日時 | 2020-03-23 16:42:45 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 553 bytes |
コンパイル時間 | 313 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 45,248 KB |
最終ジャッジ日時 | 2024-12-26 10:08:22 |
合計ジャッジ時間 | 43,601 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 52 WA * 3 |
ソースコード
#!/usr/bin/ python3.8 import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np A, B, C = map(int, read().split()) f = [1, A, B, C] roots = np.roots(f) roots = np.rint(roots).astype(np.int64) ind = np.abs(roots).argsort() roots = roots[ind] r = roots[0] f = [1, A + r, B + r * (A + r)] roots = np.roots(f) roots = np.rint(roots).astype(np.int64) ind = np.abs(roots).argsort() roots = roots[ind] s = roots[0] roots = np.array([r, s, -A - r - s]) roots.sort() print(*roots)