Playing with bits

https://ide.codingblocks.com/#/s/13738

sir this is my code link, but I’m not getting why it’s working wrong for
while(q!=0) . As it works fine for while(q–>0). why?

Provide the Qn. Link .

https://ide.codingblocks.com/#/s/13738

here it is, I apologise for my late reply!
please check it…

Hey Anushka ! , actulally your code has runtime error as you missed to decrement q-- in while loop and one more thing the numbers are so large so take long long instead of int .
Here is your modified code ! https://ide.codingblocks.com/#/s/14298
Cool now ??

yeahh… I got it thanks a lot :slight_smile: