why does time limit exceeds in such an small code
include
using namespace std;
int main()
{
unsigned int a,b,c,d,e,f,g=1;
cin>>a;
for(b=0;b<a;b++)
{
cin>>c>>d;
for(e=c;e<=d;e++)
{
for(f=2;f<=e/2;f++)
{
if(e%f==0)
{
g=0;
break;
}
}
if(g==1)
{
cout<<e<<endl;
}
}
cout<<endl;
}
return 0;
}