Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
41038 | liusiyu | 找素数(蓝桥杯2012决赛第1题) | C++ | Compile Error | 0 MS | 0 KB | 375 | 2024-02-18 20:19:15 |
#include<bits/stdc++.h> using namespace std; int main() { long long a[1000000000005]={}; int cnt=0; bool m; for(int i=2;i<=99999999999999999;i++){ m=true; for(int j=2;j<i;j++){ if(i%j==0){ m=false; break; } } if(m==true){ a[cnt]=i; cnt++; } if(cnt==100004){ cout<<a[100002]; break; } } return 0; }