提交时间:2023-10-05 11:22:07
运行 ID: 105177
#include<bits/stdc++.h> using namespace std; int f(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"; } else { cout<<k<<","<<k+1<<"-->"<<2*k+1<<","<<2*k+2<<endl; } } int main() { int k; cin>>k; 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"; f(k); return 0; }