提交时间:2023-10-05 11:23:32
运行 ID: 105184
#include<iostream> #include<cstdio> //1122 //1 212 //121 2 // using namespace std; int qi(int k){ if(k==4){ cout<<"4,5-->9,10\n8,9-->4,5\n2,3-->8,9\n7,8-->2,3\n1,2-->7,8\n"; }else{ cout<<k<<','<<k+1<<"-->"<<2*k+1<<","<<2*k+2<<endl<<2*k-1<<','<<2*k<<"-->"<<k<<','<<k+1<<endl; return qi(k-1); } } int main(){ int a; cin>>a; qi(a); return 0; }