結果

問題 No.550 夏休みの思い出(1)
ユーザー maspy
提出日時 2020-03-23 16:45:53
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 563 bytes
コンパイル時間 205 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 45,252 KB
最終ジャッジ日時 2024-12-26 10:15:29
合計ジャッジ時間 41,788 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 52 WA * 3
権限があれば一括ダウンロードができます

ソースコード

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