Time limit exceed error unable to run

Time limit exceed error unable to run

hey @EkanshJain2323,
Please provide a link to your code as well. So i can have a look

#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;
}