結果
問題 |
No.1664 Unstable f(n)
|
ユーザー |
![]() |
提出日時 | 2021-09-03 21:38:54 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 199 bytes |
コンパイル時間 | 308 ms |
コンパイル使用メモリ | 82,224 KB |
実行使用メモリ | 75,804 KB |
最終ジャッジ日時 | 2024-12-15 11:04:11 |
合計ジャッジ時間 | 9,597 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 WA * 10 |
ソースコード
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)