提交时间:2026-01-09 15:38:49

运行 ID: 81949

#include<iostream> #include<cmath> using namespace std; int main() { int n; cin>>n; int zhishu=0; for(int i=2;;i++) { int s=0; for(int j=2;j<=sqrt(i);j++) { if(i%j==0) { s+=1; } } if(s==0) { zhishu+=1; } if(zhishu==n) { printf("%d",i); break; } } }