結果

問題 No.1664 Unstable f(n)
ユーザー rlangevinrlangevin
提出日時 2022-12-31 19:51:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 336 bytes
コンパイル時間 337 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 76,048 KB
最終ジャッジ日時 2023-08-17 19:30:48
合計ジャッジ時間 6,052 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
75,152 KB
testcase_01 AC 87 ms
75,164 KB
testcase_02 AC 88 ms
75,356 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 91 ms
75,392 KB
testcase_07 AC 86 ms
75,316 KB
testcase_08 AC 89 ms
75,588 KB
testcase_09 AC 89 ms
75,504 KB
testcase_10 AC 88 ms
75,380 KB
testcase_11 AC 89 ms
75,816 KB
testcase_12 AC 89 ms
75,924 KB
testcase_13 AC 89 ms
75,996 KB
testcase_14 AC 88 ms
75,912 KB
testcase_15 AC 87 ms
75,716 KB
testcase_16 AC 88 ms
75,900 KB
testcase_17 AC 90 ms
75,820 KB
testcase_18 AC 91 ms
75,816 KB
testcase_19 AC 90 ms
76,048 KB
testcase_20 AC 91 ms
75,768 KB
testcase_21 AC 86 ms
75,292 KB
testcase_22 AC 88 ms
75,376 KB
testcase_23 AC 88 ms
75,448 KB
testcase_24 AC 88 ms
75,380 KB
testcase_25 AC 88 ms
75,152 KB
testcase_26 AC 87 ms
75,376 KB
testcase_27 AC 88 ms
75,380 KB
testcase_28 AC 87 ms
75,536 KB
testcase_29 AC 87 ms
75,372 KB
testcase_30 AC 90 ms
75,396 KB
testcase_31 AC 88 ms
75,376 KB
testcase_32 AC 88 ms
75,908 KB
testcase_33 AC 88 ms
75,172 KB
testcase_34 AC 89 ms
75,288 KB
testcase_35 AC 87 ms
75,768 KB
testcase_36 AC 89 ms
75,296 KB
testcase_37 AC 88 ms
75,924 KB
testcase_38 AC 89 ms
75,180 KB
testcase_39 AC 89 ms
75,460 KB
testcase_40 AC 90 ms
75,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def calc(N, j):
    yes = 1
    no = 10 ** 18 + 1
    while no - yes != 1:
        mid = (yes + no)//2
        if mid ** j <= N:
            yes = mid
        else:
            no = mid
    return yes


N = int(input())
ans = 10 ** 20
for j in range(1, 65):
    i = calc(N, j)
    k = N - i ** j
    ans = min(ans, i + j + k)
print(ans)
0