| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 46098 | liusiyu | 找素数(蓝桥杯2012决赛第1题) | C++ | Accepted | 273 MS | 240 KB | 305 | 2024-04-24 21:13:15 |
#include<bits/stdc++.h> using namespace std; bool pd(int x){ for(int i=2;i*i<=x;i++){ if(x%i==0) return 0; } return 1; } int main() { int cnt=0; for(int i=2;i<=99999999999;i++){ if(pd(i)==1){ cnt++; if(cnt==100002){ cout<<i; return 0; } } } return 0; }