Run ID:17980
提交时间:2021-10-10 20:27:58
#include<iostream> #include<cstring> using namespace std; int main() { char a[9999],s[9999],e[9999]; int b,c,d; cin>>b; getchar(); while(b--){ gets(a); gets(s); strcpy(e,a); c=strlen(a); d=strlen(s); if(c%2!=0){ continue; } for(int i=0;i<c+d;i++){ if(i<c/2){ a[i]=a[i]; } else if(i<c/2+d){ a[i]=s[i-c/2]; } else{ a[i]=e[i-d]; } } for(int i=0;i<c+d;i++){ cout<<a[i]; } cout<<endl; } return 0; }