結果

問題 No.1664 Unstable f(n)
ユーザー ngng628ngng628
提出日時 2021-11-22 04:00:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 166 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 76,944 KB
最終ジャッジ日時 2023-09-05 17:22:43
合計ジャッジ時間 12,950 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
75,792 KB
testcase_01 AC 110 ms
75,904 KB
testcase_02 AC 103 ms
75,932 KB
testcase_03 AC 80 ms
75,712 KB
testcase_04 AC 88 ms
75,904 KB
testcase_05 AC 89 ms
75,832 KB
testcase_06 AC 88 ms
75,976 KB
testcase_07 AC 88 ms
75,892 KB
testcase_08 AC 88 ms
76,016 KB
testcase_09 AC 89 ms
75,980 KB
testcase_10 AC 89 ms
75,964 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 108 ms
75,976 KB
testcase_22 AC 109 ms
76,028 KB
testcase_23 AC 107 ms
75,868 KB
testcase_24 AC 102 ms
76,136 KB
testcase_25 AC 111 ms
76,040 KB
testcase_26 AC 96 ms
76,040 KB
testcase_27 AC 96 ms
75,924 KB
testcase_28 AC 97 ms
75,956 KB
testcase_29 AC 95 ms
75,944 KB
testcase_30 AC 96 ms
76,028 KB
testcase_31 AC 98 ms
75,936 KB
testcase_32 AC 116 ms
75,960 KB
testcase_33 AC 106 ms
75,888 KB
testcase_34 AC 105 ms
75,956 KB
testcase_35 AC 709 ms
76,632 KB
testcase_36 AC 109 ms
75,960 KB
testcase_37 AC 199 ms
76,488 KB
testcase_38 AC 96 ms
76,044 KB
testcase_39 AC 114 ms
76,116 KB
testcase_40 AC 125 ms
76,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

ans = n  # i == 1
for i in range(2, 10**6):
   j = 0
   while i**(j + 1) <= n:
      j += 1
   k = n - i**j
   ans = min(ans, i + j + k)

print(ans)
0