結果
| 問題 |
No.1664 Unstable f(n)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-03 21:25:04 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 200 bytes |
| コンパイル時間 | 406 ms |
| コンパイル使用メモリ | 82,492 KB |
| 実行使用メモリ | 75,852 KB |
| 最終ジャッジ日時 | 2024-12-15 09:42:08 |
| 合計ジャッジ時間 | 5,425 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 WA * 10 |
ソースコード
n = int(input())
ans = n
for i in range(2,min(n+1,10**6+5)):
x = 0
num = 1
while num <= n:
num *= i
x += 1
num //= i
x -= 1
ans = min(ans,i+x+n-num)
print(ans)