In the FIBEASY question
I have used a section of code for calculating the nearest number which can be expressed as 2^k, where k is some number.
First approach by using :
Secod approach by using :
ll pos = 0 ; while (N >>= 1) ++pos;
N has a limit of 10^18;
First approach : https://www.codechef.com/viewsolution/33177791
This fails in the second subtask.
Using bitwise shift gives an AC.
Any ideas why the first method fails…?