結果
問題 |
No.1664 Unstable f(n)
|
ユーザー |
|
提出日時 | 2024-10-27 23:26:23 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 259 bytes |
コンパイル時間 | 293 ms |
コンパイル使用メモリ | 82,232 KB |
実行使用メモリ | 70,988 KB |
最終ジャッジ日時 | 2024-10-27 23:26:27 |
合計ジャッジ時間 | 3,911 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 35 WA * 3 |
ソースコード
N = int(input()) ans = N+1 for j in range(2,60+1): high = N low = 1 while high-low>1: mid = (high+low)//2 if pow(mid,j)<=N: low = mid else: high = mid ans = min(ans,low+j+N-pow(low,j)) print(ans)