| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 148540 | 刘益梵 | 素数对 | C++ | Wrong Answer | 17 MS | 276 KB | 360 | 2026-02-25 16:42:38 |
#include<bits/stdc++.h> using namespace std; int ooo(int n){ if(n<2){ return 0; } for(int i=2;i<n;i++){ if(n%i==0){ return 0; } } return 1; } int main(){ int a,s=0; cin>>a; for(int i=2;i<=a-2;i++){ if(ooo(i)==1 && ooo(i+2)==1){ s++; cout<<i<<" "<<i+2<<endl; } } if(s==0){ cout<<"NO"; } return 0; }
------Input------
1
------Answer-----
No
------Your output-----
NO