| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 57025 | 石利伟 | 密码质数 | C++ | Accepted | 100 | 7 MS | 256 KB | 337 | 2022-08-03 17:39:21 |
#include<bits/stdc++.h> using namespace std; int n,a[10000],ans=1; void ntoa(){ for(int j=2;j<=8000;j++){ bool flag=true; for(int k=2;k<=j/k;k++){ if(j%k==0) flag=false; } if(flag)a[ans++]=j; } } int main(){ ntoa(); cin>>n; for(int i=0;i<n;i++){ int o; cin>>o; cout<<a[o]<<endl; } return 0; }