#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int n,s=0;;
cin>>n;
int i=2;
while(true)
{
bool flag=true;
for(int j=2;j<=sqrt(i);j++)
{
if(i%j==0)
{
flag=false;
break;
}
}
if(flag==true)
{
s++;
if(s==n)
{
cout<<i<<endl;
break;
}
}
i++;
}
return 0;
}
想要其他题目答案,黑客小程序,或c++基础的,关注我。
求点赞!