結果

問題 No.550 夏休みの思い出(1)
ユーザー imulanimulan
提出日時 2017-08-15 23:04:17
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 438 bytes
コンパイル時間 1,988 ms
コンパイル使用メモリ 86,904 KB
実行使用メモリ 79,928 KB
最終ジャッジ日時 2023-08-03 14:14:36
合計ジャッジ時間 12,263 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 208 ms
76,408 KB
testcase_01 AC 76 ms
75,824 KB
testcase_02 AC 67 ms
71,416 KB
testcase_03 AC 69 ms
71,572 KB
testcase_04 WA -
testcase_05 AC 67 ms
71,280 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 70 ms
71,504 KB
testcase_09 AC 210 ms
76,576 KB
testcase_10 AC 209 ms
76,540 KB
testcase_11 AC 160 ms
76,244 KB
testcase_12 AC 160 ms
76,312 KB
testcase_13 AC 214 ms
76,408 KB
testcase_14 AC 209 ms
76,408 KB
testcase_15 RE -
testcase_16 AC 213 ms
76,624 KB
testcase_17 AC 209 ms
76,368 KB
testcase_18 AC 205 ms
76,228 KB
testcase_19 AC 206 ms
76,424 KB
testcase_20 RE -
testcase_21 RE -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 74 ms
75,636 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 74 ms
75,676 KB
testcase_28 WA -
testcase_29 AC 75 ms
75,468 KB
testcase_30 WA -
testcase_31 AC 200 ms
76,612 KB
testcase_32 AC 196 ms
76,604 KB
testcase_33 AC 186 ms
76,568 KB
testcase_34 AC 199 ms
76,836 KB
testcase_35 AC 193 ms
76,684 KB
testcase_36 AC 193 ms
76,732 KB
testcase_37 AC 191 ms
76,612 KB
testcase_38 AC 185 ms
76,508 KB
testcase_39 AC 194 ms
76,352 KB
testcase_40 AC 81 ms
75,756 KB
testcase_41 AC 81 ms
75,676 KB
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 76 ms
75,676 KB
testcase_48 AC 75 ms
75,772 KB
testcase_49 AC 75 ms
75,860 KB
testcase_50 AC 75 ms
75,860 KB
testcase_51 AC 78 ms
75,676 KB
testcase_52 AC 76 ms
75,516 KB
testcase_53 AC 125 ms
76,548 KB
testcase_54 AC 122 ms
76,500 KB
testcase_55 AC 96 ms
76,088 KB
testcase_56 AC 121 ms
76,400 KB
testcase_57 AC 146 ms
76,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

N = 1000000

def f(x,a,b,c):
    return x**3 + a*x**2 + b*x + c

def main():
    A,B,C = map(int,input().split())

    p = -N+1
    while True:
        if f(p,A,B,C) == 0:
            break
        p += 1

    D = round(math.sqrt((p*B+C)**2 + 4*C*p**3))
    q = (p*B+C + D) // (2*p**2)
    r = (p*B+C - D) // (2*p**2)

    ans = [p,q,r]
    ans.sort()
    print(' '.join(map(str,ans)))

if __name__ == '__main__':
    main()
0