#include<iostream>
using namespace std;
int main()
{
long long a,m,n,w,g;
bool s=1;
cin>>g;
for(int i=1;i<=g;++i)
{
cin>>m>>n;
a=m;
for(w=m;a<=n;w++)
{
for(int q=2;q<a;q++)
{
if(a%q==0)
{
s=0;
}
}
if(s)
cout<<a<<endl;
a++;
s=1;
}
}
}
怎么TLE了,自己测试时没有问题啊