提交时间:2023-12-24 14:12:31

运行 ID: 33190

#include "iostream" #define int long long using namespace std; bool check(int x){ for(int i=2;i*i<=x;i++){ if(x%i==0)return false; } return true; } signed main(){ int n; int ans=2; int i=0; cin>>n; while(n){ if(check(ans)){ i++; } if(i==n){ cout<<ans; return 0; } ans++; } return 0; }