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