| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 56168 | 王籽易 | 挑质数 | C++ | Wrong Answer | 0 | 0 MS | 260 KB | 394 | 2022-08-01 15:58:09 |
#include <bits/stdc++.h> using namespace std; int n,ans=0,a[10000]; bool f(int a){ if(a==1) return 0; if(a==2) return 1; for(int i=2;i<=a/i;i++){ if(a%i==0) return 0; } return 1; } int main(){ cin>>n; for(int i=1;i<=n;i++){ int t; cin>>t; if(f(t)){ cin>>a[++ans]; } } cout<<ans<<endl; for(int i=1;i<=ans;i++){ cout<<a[i]<<endl; } return 0; }