Time limit exceed error unable to run
Time limit exceed error unable to run
#include
using namespace std;
int main() {
int t;
cin>>t;
while(t–)
{
long long a,b,ctr=0;
cin>>a>>b;
for(long long i=a;i<=b;i++)
{
while(i>0)
{
ctr+=i&1;
i>>=1;
}
}
cout<<ctr<<"\n";
}
return 0;
}