Doubt in Codigo first problem ( very easy one )

why is this code giving WA , Link to problem

just write the return 0 outside the while loop and then ur code works fine.:slight_smile:

1 Like

Good, thanks :sweat_smile: :rofl: , I don’t know what to say :sweat_smile:

1 Like

hi, can you explain the logic of your solution.

counting set bits in n

1 Like