https://ide.codingblocks.com/s/283732 i am getting tle?
Playing with bits
hello @tusharjha9835

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.