WA in test case 1. check my code
#include
using namespace std;
int main() {
int t,c=0;
cin>>t;
while(t)
{
int a,b;
cin>>a>>b;
for(int i=a;i<=b;i++)
{
int temp=i;
while(temp)
{
temp=temp&(temp-1);
c++;
}
}
cout<<c<<endl;
t–;
}
return 0;
}