Wrong answer for all test cases

My solution: https://ide.codingblocks.com/s/433908

Question: https://online.codingblocks.com/app/player/178555/content/173733/4761/code-challenge

Getting expected answers for all values of n while compiling, but getting wrong answers for all test cases while submitting my solution.

Hello @mohaktrivedi in incredible hulk question you have to just count the number of set bits.
check this:

@tusharaggarwal272 Oh! I thought so after looking at the input and output given, but after reading the explanation I got confused and thought that it’s just a coincidence that the given output shows number of set-bits.
Thanks for clearing my doubt.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.