Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
158930 汪义罗 素数对 C++ Wrong Answer 1 MS 272 KB 326 2026-08-23 13:50:03

Tests(0/10):


Code:

#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-j==2 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; }


Run Info:

------Input------
17
------Answer-----
3 5 5 7 11 13
------Your output-----
3 1 4 2 5 3 6 4 7 5 8 6 9 7 10 8 11 9 12 10 13 11 14 12 15 13 16 14 17 15