Playing with bits

https://ide.codingblocks.com/s/283732 i am getting tle?

hello @tusharjha9835
image
here u r updating i inside while loop due to which , correct counting of i is getting affected.

to rectify it , store i in some variable and use that variable to count number of set bits.