提交时间:2023-10-05 11:05:21
运行 ID: 105141
#include<iostream> using namespace std; char ssr(int x) { if(x==4) cout<<"4,5-->9,10"<<endl<<"8,9-->4,5"<<endl<<"2,3-->8,9"<<endl<<"7,8-->2,3"<<endl<<"1,2-->7,8"; else { cout<<x<<","<<x+1<<"-->"<<2*x+1<<","<<2*x+2<<endl; cout<<2*x-1<<","<<2*x<<"-->"<<x<<","<<x+1<<endl; return ssr(x-1); } } int main() { int a; cin>>a; ssr(a); return 0; }