How to approach for this problem??
Playing with Bits
You have to count the see bits for the number which lies between a and b. It is very simple to count. See this code for reference. https://ide.codingblocks.com/s/220466 .
Either there is a inbuilt function to count see bit in c++. You can google it.
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.