Problem - interesting XOR
My Solution
https://www.codechef.com/viewsolution/50007511
Consider input:
8
Thank you @akshitm16 for replying. I found my mistake. My code was producing wrong results for numbers in the form of 2^n (2 to power of n). It was performing one less loop on that. So the correct solution would be to put '<=" sign in the while loop instead of ‘<’.