Comments

It worked

I just installed CF predictor, but it didn't work. I don't know why.

https://codeforces.me/contest/1560/submission/126341076

here is my solution, it's easy to understand (At least I think so. 0.0)

idea: First preprocess all the powers of 2, a total of 60. Then compare n with these one by one and take the minimum number of operations.