結果

問題 No.1664 Unstable f(n)
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-09-03 21:28:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 246 bytes
コンパイル時間 404 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 75,392 KB
最終ジャッジ日時 2024-05-09 01:46:26
合計ジャッジ時間 4,126 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
57,728 KB
testcase_01 AC 57 ms
59,008 KB
testcase_02 AC 59 ms
58,624 KB
testcase_03 AC 43 ms
57,472 KB
testcase_04 AC 46 ms
57,856 KB
testcase_05 AC 51 ms
57,600 KB
testcase_06 AC 46 ms
57,984 KB
testcase_07 AC 47 ms
58,112 KB
testcase_08 AC 46 ms
57,984 KB
testcase_09 AC 48 ms
57,984 KB
testcase_10 AC 47 ms
57,984 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 57 ms
58,368 KB
testcase_22 AC 59 ms
59,008 KB
testcase_23 AC 58 ms
59,136 KB
testcase_24 AC 51 ms
58,992 KB
testcase_25 AC 59 ms
58,880 KB
testcase_26 AC 52 ms
59,136 KB
testcase_27 AC 52 ms
59,008 KB
testcase_28 AC 53 ms
59,136 KB
testcase_29 AC 52 ms
58,880 KB
testcase_30 AC 52 ms
59,136 KB
testcase_31 AC 50 ms
58,368 KB
testcase_32 AC 60 ms
58,368 KB
testcase_33 AC 57 ms
58,368 KB
testcase_34 AC 58 ms
58,368 KB
testcase_35 AC 78 ms
75,264 KB
testcase_36 AC 58 ms
58,240 KB
testcase_37 AC 64 ms
65,920 KB
testcase_38 AC 52 ms
58,752 KB
testcase_39 AC 56 ms
59,008 KB
testcase_40 AC 63 ms
59,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

"""

import sys
from sys import stdin

n = int(stdin.readline())

ans = n
for i in range(2,1000000):

    x = 1
    cnt = 0

    while x * i <= n:
        x *= i
        cnt += 1

    k = n - x
    ans = min(ans , i + cnt + k)

print (ans)
0