提交时间:2023-10-05 11:06:00
运行 ID: 105145
#include<bits/stdc++.h> using namespace std; void qwq(int n){ if(n==4){ cout<<"4,5-->9,10"<<endl; cout<<"8,9-->4,5"<<endl; cout<<"2,3-->8,9"<<endl; cout<<"7,8-->2,3"<<endl; cout<<"1,2-->7,8"<<endl; return; } cout<<n<<","<<n+1<<"-->"<<2*n+1<<","<<2*n+2<<endl; cout<<2*n-1<<","<<2*n<<"-->"<<n<<","<<n+1<<endl; return qwq(n-1); } int main(){ int n; cin>>n; qwq(n); return 0; }