結果

問題 No.1664 Unstable f(n)
ユーザー shinichishinichi
提出日時 2021-09-03 22:16:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 269 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 87,156 KB
実行使用メモリ 71,892 KB
最終ジャッジ日時 2023-08-21 22:23:13
合計ジャッジ時間 4,914 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,800 KB
testcase_01 AC 72 ms
71,796 KB
testcase_02 AC 74 ms
71,592 KB
testcase_03 AC 72 ms
71,504 KB
testcase_04 AC 72 ms
71,768 KB
testcase_05 AC 72 ms
71,864 KB
testcase_06 AC 71 ms
71,768 KB
testcase_07 AC 73 ms
71,684 KB
testcase_08 AC 73 ms
71,820 KB
testcase_09 AC 71 ms
71,608 KB
testcase_10 AC 72 ms
71,800 KB
testcase_11 AC 72 ms
71,812 KB
testcase_12 AC 71 ms
71,592 KB
testcase_13 AC 73 ms
71,476 KB
testcase_14 AC 75 ms
71,736 KB
testcase_15 AC 72 ms
71,808 KB
testcase_16 AC 73 ms
71,468 KB
testcase_17 AC 71 ms
71,812 KB
testcase_18 AC 72 ms
71,844 KB
testcase_19 AC 72 ms
71,740 KB
testcase_20 AC 72 ms
71,816 KB
testcase_21 AC 73 ms
71,592 KB
testcase_22 AC 72 ms
71,760 KB
testcase_23 AC 73 ms
71,820 KB
testcase_24 AC 71 ms
71,860 KB
testcase_25 AC 74 ms
71,596 KB
testcase_26 AC 73 ms
71,736 KB
testcase_27 AC 70 ms
71,736 KB
testcase_28 AC 72 ms
71,588 KB
testcase_29 AC 71 ms
71,828 KB
testcase_30 AC 71 ms
71,464 KB
testcase_31 AC 71 ms
71,820 KB
testcase_32 AC 72 ms
71,484 KB
testcase_33 AC 72 ms
71,612 KB
testcase_34 AC 71 ms
71,876 KB
testcase_35 AC 73 ms
71,756 KB
testcase_36 AC 73 ms
71,840 KB
testcase_37 AC 72 ms
71,752 KB
testcase_38 AC 72 ms
71,848 KB
testcase_39 AC 72 ms
71,892 KB
testcase_40 AC 72 ms
71,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

# jは最大でも60

ans = N
for j in range(1, 60):
    i = N ** (1/j)
    floor, ceil = int(i), int(i)+1
    for i in range(max(0, floor), ceil+1):
        if i**j > N:
            break
        k = N - i**j
        ans = min(ans, i+j+k)

print(ans)
0