Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
56574 | yuboyuan | 第n小的质数 | C++ | Compile Error | 0 MS | 0 KB | 348 | 2024-11-14 17:43:37 |
#include<iostream> using namespace std; int main() { int n; cin>>n; for(int i=2;n>0;i++) { bool a=1; for(int j=2;j*j<=n;i++) { if(i%j==0) { a=0; break; } } if(a) n--; } cout<<i-1; return 0; }