Run ID:158931
提交时间: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; }