#include
using namespace std;
int main() {
int t, n, count, i, c=3;
cin>>t;
while(t–) {
cin>>n;
if(n==1) {
cout<<“2”<<"\n";
}
else if(n>1) {
for(count=2;count<=n;c++) {
for(i=2;i<c;i++) {
if(c%i==0)
break;
}
if(c==i)
count++;
}
cout<<i<<"\n";
}
}
return 0;
}
Time limit exceeded error. Please help.