I did not undestand this problem. In sample input 2 is number of queries, 10 and 15 are integers but what is 1 and 1 in the second line. Also didn’t understand the sample output. Please clear both of them once.
Playing with bits problem statement
@sb1251224_6919c19fccd96630,
here u need to print the sum of no of all set bits from range inclusive
Sample Input
2
1 1
10 15
Sample Output
1
17
here 2 queries are asked (line 1)
first query has 2 numbers 1,1 you need to output sum of no of all setbits form 1 to 1
second query has 2 numbers 10,15 you need to output sum of no of all setbits form 10 to 15
ans is
1
17 respectively
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.