結果

問題 No.550 夏休みの思い出(1)
ユーザー fiordfiord
提出日時 2017-07-29 09:18:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 558 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-04-19 04:50:44
合計ジャッジ時間 3,320 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 RE -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 RE -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 30 ms
11,136 KB
testcase_12 AC 29 ms
11,136 KB
testcase_13 AC 30 ms
10,880 KB
testcase_14 WA -
testcase_15 AC 30 ms
10,880 KB
testcase_16 AC 31 ms
10,880 KB
testcase_17 AC 30 ms
10,880 KB
testcase_18 AC 29 ms
10,880 KB
testcase_19 AC 32 ms
10,880 KB
testcase_20 AC 31 ms
10,880 KB
testcase_21 WA -
testcase_22 AC 29 ms
10,880 KB
testcase_23 AC 30 ms
11,008 KB
testcase_24 WA -
testcase_25 AC 28 ms
10,880 KB
testcase_26 AC 29 ms
10,880 KB
testcase_27 AC 29 ms
10,880 KB
testcase_28 AC 30 ms
11,008 KB
testcase_29 AC 30 ms
10,880 KB
testcase_30 AC 29 ms
10,880 KB
testcase_31 AC 30 ms
10,880 KB
testcase_32 AC 29 ms
10,880 KB
testcase_33 AC 29 ms
10,880 KB
testcase_34 WA -
testcase_35 AC 29 ms
10,880 KB
testcase_36 AC 29 ms
10,880 KB
testcase_37 WA -
testcase_38 AC 30 ms
10,880 KB
testcase_39 AC 30 ms
11,008 KB
testcase_40 AC 30 ms
10,880 KB
testcase_41 AC 29 ms
10,880 KB
testcase_42 AC 29 ms
10,880 KB
testcase_43 AC 30 ms
11,008 KB
testcase_44 AC 28 ms
10,880 KB
testcase_45 AC 29 ms
11,008 KB
testcase_46 AC 29 ms
10,880 KB
testcase_47 AC 30 ms
10,880 KB
testcase_48 AC 29 ms
11,008 KB
testcase_49 AC 29 ms
10,880 KB
testcase_50 AC 29 ms
10,880 KB
testcase_51 AC 30 ms
10,880 KB
testcase_52 AC 29 ms
10,880 KB
testcase_53 AC 30 ms
10,880 KB
testcase_54 AC 30 ms
10,880 KB
testcase_55 AC 30 ms
11,008 KB
testcase_56 AC 30 ms
10,880 KB
testcase_57 AC 30 ms
11,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
a, b, c = map(int, input().split())
l = -2 * 10**9
r = 2 * 10**9
for i in range(100):
    m = (l + r) / 2.0
    if m**3 + a * m**2 + b * m + c > 0:
        r = m
    else:
        l = m
s = (l + r) / 2.0
d = a + s
e = -c / s
l = d / -2.0
r = 2 * 10**9
for i in range(100):
    m = (l + r) / 2.0
    if m**2 + d * m + e > 0:
        r = m
    else:
        l = m
t = (l + r) / 2.0
u = -s - t - a
ret = list({s, t, u})
ret.sort()
for i in range(3):
    ret[i] = int(ret[i] + 10**-9 if ret[i] > 0 else ret[i] - 10**-9)
print(ret[0], ret[1], ret[2])
0