結果
問題 |
No.1664 Unstable f(n)
|
ユーザー |
|
提出日時 | 2021-09-03 21:30:20 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 151 bytes |
コンパイル時間 | 484 ms |
コンパイル使用メモリ | 82,212 KB |
実行使用メモリ | 75,696 KB |
最終ジャッジ日時 | 2024-12-15 10:11:30 |
合計ジャッジ時間 | 24,222 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 WA * 21 |
ソースコード
n = int(input()) ans = n for i in range(2, 3 * 10 ** 6): j = 0 while n - pow(i, j) > 0: ans = min(ans, i + j + (n - pow(i, j))) j += 1 print(ans)