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