結果

問題 No.550 夏休みの思い出(1)
ユーザー maspymaspy
提出日時 2020-03-23 16:45:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 563 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 10,912 KB
実行使用メモリ 30,572 KB
最終ジャッジ日時 2023-08-27 03:19:13
合計ジャッジ時間 12,541 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 133 ms
30,212 KB
testcase_03 AC 135 ms
30,332 KB
testcase_04 AC 133 ms
30,292 KB
testcase_05 AC 133 ms
30,392 KB
testcase_06 AC 135 ms
30,476 KB
testcase_07 AC 134 ms
30,192 KB
testcase_08 WA -
testcase_09 AC 134 ms
30,404 KB
testcase_10 AC 135 ms
30,276 KB
testcase_11 AC 134 ms
30,288 KB
testcase_12 AC 136 ms
30,488 KB
testcase_13 AC 134 ms
30,292 KB
testcase_14 AC 137 ms
30,396 KB
testcase_15 AC 137 ms
30,328 KB
testcase_16 AC 134 ms
30,172 KB
testcase_17 AC 138 ms
30,200 KB
testcase_18 AC 139 ms
30,380 KB
testcase_19 AC 138 ms
30,348 KB
testcase_20 AC 136 ms
30,336 KB
testcase_21 AC 137 ms
30,308 KB
testcase_22 AC 136 ms
30,396 KB
testcase_23 AC 136 ms
30,312 KB
testcase_24 AC 137 ms
30,276 KB
testcase_25 AC 136 ms
30,272 KB
testcase_26 AC 137 ms
30,212 KB
testcase_27 AC 135 ms
30,328 KB
testcase_28 AC 135 ms
30,328 KB
testcase_29 AC 136 ms
30,392 KB
testcase_30 AC 137 ms
30,216 KB
testcase_31 AC 138 ms
30,184 KB
testcase_32 AC 137 ms
30,168 KB
testcase_33 AC 136 ms
30,392 KB
testcase_34 AC 136 ms
30,484 KB
testcase_35 AC 136 ms
30,192 KB
testcase_36 AC 137 ms
30,508 KB
testcase_37 AC 136 ms
30,132 KB
testcase_38 AC 138 ms
30,316 KB
testcase_39 AC 137 ms
30,316 KB
testcase_40 AC 137 ms
30,328 KB
testcase_41 AC 133 ms
30,320 KB
testcase_42 AC 135 ms
30,488 KB
testcase_43 AC 137 ms
30,216 KB
testcase_44 AC 132 ms
30,380 KB
testcase_45 AC 133 ms
30,256 KB
testcase_46 AC 135 ms
30,392 KB
testcase_47 AC 135 ms
30,380 KB
testcase_48 AC 135 ms
30,328 KB
testcase_49 AC 137 ms
30,512 KB
testcase_50 AC 135 ms
30,256 KB
testcase_51 AC 133 ms
30,360 KB
testcase_52 AC 135 ms
30,388 KB
testcase_53 AC 133 ms
30,376 KB
testcase_54 AC 135 ms
30,388 KB
testcase_55 AC 136 ms
30,316 KB
testcase_56 AC 135 ms
30,152 KB
testcase_57 AC 135 ms
30,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/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).real.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).real.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)
0