結果

問題 No.1664 Unstable f(n)
ユーザー huka_hukahuka_huka
提出日時 2021-09-04 19:53:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 186 bytes
コンパイル時間 258 ms
コンパイル使用メモリ 82,152 KB
実行使用メモリ 54,472 KB
最終ジャッジ日時 2024-06-01 08:40:18
合計ジャッジ時間 3,396 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,452 KB
testcase_01 AC 37 ms
53,468 KB
testcase_02 AC 40 ms
52,736 KB
testcase_03 AC 38 ms
53,016 KB
testcase_04 AC 38 ms
52,940 KB
testcase_05 AC 38 ms
53,496 KB
testcase_06 AC 39 ms
52,932 KB
testcase_07 AC 39 ms
53,336 KB
testcase_08 AC 42 ms
52,532 KB
testcase_09 AC 39 ms
52,808 KB
testcase_10 AC 39 ms
52,868 KB
testcase_11 AC 39 ms
52,852 KB
testcase_12 AC 39 ms
54,200 KB
testcase_13 AC 39 ms
52,864 KB
testcase_14 AC 39 ms
52,716 KB
testcase_15 AC 39 ms
52,684 KB
testcase_16 AC 38 ms
52,900 KB
testcase_17 AC 39 ms
52,728 KB
testcase_18 AC 39 ms
53,528 KB
testcase_19 AC 39 ms
52,972 KB
testcase_20 AC 39 ms
53,448 KB
testcase_21 AC 39 ms
54,472 KB
testcase_22 AC 39 ms
53,048 KB
testcase_23 AC 38 ms
53,548 KB
testcase_24 AC 40 ms
53,140 KB
testcase_25 AC 39 ms
53,736 KB
testcase_26 AC 38 ms
52,700 KB
testcase_27 AC 38 ms
53,544 KB
testcase_28 AC 39 ms
53,848 KB
testcase_29 AC 38 ms
52,976 KB
testcase_30 AC 39 ms
52,968 KB
testcase_31 AC 39 ms
52,688 KB
testcase_32 AC 39 ms
53,524 KB
testcase_33 AC 37 ms
52,736 KB
testcase_34 AC 39 ms
52,944 KB
testcase_35 AC 39 ms
53,828 KB
testcase_36 AC 39 ms
53,756 KB
testcase_37 AC 39 ms
52,516 KB
testcase_38 AC 40 ms
54,308 KB
testcase_39 AC 39 ms
53,128 KB
testcase_40 AC 39 ms
52,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import floor
n = int(input())
ans = n
for j in range(2, 61):
    i = floor(n**(1/j))
    while (i+1)**j <= n:
        i += 1
    k = n-i**j
    ans = min(ans, i+j+k)
print(ans)
0