| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158931 | 汪义罗 | 素数对 | C++ | Wrong Answer | 1 MS | 272 KB | 326 | 2026-08-23 13:53:13 |
#include<iostream> using namespace std; int getsum(int n){ int he=0; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(i+2==j and j<=n and i<=n ){ he++; cout<<i<<" "<<j<<endl; } } } if(he==0){ cout<<"No"; } } int main() { int a; cin>>a; getsum(a); return 0; }
------Input------
17
------Answer-----
3 5 5 7 11 13
------Your output-----
1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9 11 10 12 11 13 12 14 13 15 14 16 15 17