結果

問題 No.1664 Unstable f(n)
ユーザー huka_hukahuka_huka
提出日時 2021-09-03 21:38:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 199 bytes
コンパイル時間 342 ms
コンパイル使用メモリ 82,344 KB
実行使用メモリ 75,740 KB
最終ジャッジ日時 2024-05-09 02:30:45
合計ジャッジ時間 10,964 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
58,240 KB
testcase_01 AC 79 ms
58,880 KB
testcase_02 AC 83 ms
59,008 KB
testcase_03 AC 59 ms
58,496 KB
testcase_04 AC 62 ms
58,240 KB
testcase_05 AC 60 ms
57,728 KB
testcase_06 AC 56 ms
57,984 KB
testcase_07 AC 58 ms
58,112 KB
testcase_08 AC 64 ms
57,984 KB
testcase_09 AC 57 ms
58,240 KB
testcase_10 AC 54 ms
58,240 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 75 ms
58,624 KB
testcase_22 AC 76 ms
59,392 KB
testcase_23 AC 75 ms
58,880 KB
testcase_24 AC 68 ms
59,264 KB
testcase_25 AC 76 ms
59,392 KB
testcase_26 AC 62 ms
59,136 KB
testcase_27 AC 61 ms
59,136 KB
testcase_28 AC 62 ms
59,520 KB
testcase_29 AC 62 ms
59,136 KB
testcase_30 AC 61 ms
59,392 KB
testcase_31 AC 67 ms
58,368 KB
testcase_32 AC 85 ms
58,112 KB
testcase_33 AC 74 ms
58,112 KB
testcase_34 AC 74 ms
58,576 KB
testcase_35 AC 614 ms
75,008 KB
testcase_36 AC 73 ms
58,112 KB
testcase_37 AC 163 ms
74,880 KB
testcase_38 AC 63 ms
59,776 KB
testcase_39 AC 83 ms
59,136 KB
testcase_40 AC 94 ms
70,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ans = n
i = 2
while i <= 10**6:
    j = 1
    while 1:
        if i**j > n:
            j -= 1
            break
        j += 1
    ans = min(ans, i+j+(n-i**j))
    i += 1
print(ans)
0