| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 69957 | 余慕涵 | 素数对 | C++ | Wrong Answer | 1 MS | 268 KB | 343 | 2024-04-12 20:03:37 |
#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; cin>>a; for(int i=2;i<=a-2;i++){ if(op(i)&&op(i+2)) cout<<i<<" "<<i+2<<endl;} return 0; }
------Input------
17
------Answer-----
3 5 5 7 11 13
------Your output-----
2 4 3 5 5 7 11 13