failing test case 0 due to timelimit, pls correct my code
#include
using namespace std;
int main() {
int n;
cin>>n;
while(n–)
{
int a,b;
cin>>a>>b;
int cnt=0;
int i,j;
for(i=a;i<=b;i++)
{
for(j=2;j<=i-1;j++)
{
if(i%j==0)
{
break;
}
}
if(j==i)
{
cnt++;
}
}
cout<<cnt<<endl;
}
return 0;
}
