I am doing bit manipulation problems but I used to run a loop from 0 to 32 bits

but why not 64 bits??

can anyone tell me a resource so that I can study.

From which constraints should I use 64 bits ??

N=10^{18}

\implies log_2(N) \approx 60. Hence iterate on 60 bits

N=10^9

\implies log_2(N)\approx 30. Hence iterate on 30 bits

In the same way you can check according to the constraints of the problem.

1 Like

thx a lot

1 Like