| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 41026 | liusiyu | 找素数(蓝桥杯2012决赛第1题) | C++ | Output Limit Exceeded | 0 MS | 240 KB | 325 | 2024-02-18 16:49:59 |
#include<iostream> using namespace std; int main() { int a[100005]={}; int cnt=0; bool m; for(int i=2;i<=9999999999999;i++){ m=true; for(int j=2;j<i;j++){ if(i%j==0){ m=false; break; } } if(m==true){ a[m]=i; cnt++; } if(cnt==100001) cout<<a[cnt]; } return 0; }