#include<bits/stdc++.h>
using namespace std;
int countSetBits(int n)
{
// base case
if (n == 0)
return 0;
else
return 1 + countSetBits(n & (n - 1));
}
int main() {
int t;
cin >> t;
while(t–)
{
int a,b,i,c=0;
cin >> a,b;
for(i=a;i<=b;i++)
{
c+=countSetBits(i);
}
cout<<c<<endl;
}
return 0;
}
what is wrong with the code?