| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 69958 | 余慕涵 | 素数对 | C++ | Wrong Answer | 16 MS | 272 KB | 406 | 2024-04-12 20:06:16 |
#include <iostream> #include <cstdio> using namespace std; int op(int a){ for(int i=2;i<a/2;i++){ if(a%i==0) return 0;} return 1; } int main(){ int a,v=1; cin>>a; for(int i=3;i<=a-2;i++){ if(op(i)&&op(i+2)){ cout<<i<<" "<<i+2<<endl; v=0;} } if(v==1) cout<<"NO"; return 0; }
------Input------
1
------Answer-----
No
------Your output-----
NO