Playing bits in c++


i am getting answer of 18 in dev c++ compiler ,but in ide i was getting an error .what is wrong int the code?

@Chandra123 Error is because of your loop for the test cases which is running infinitely. So change line number 6 to while(t–)