提交时间:2019-12-21 20:24:42
运行 ID: 3769
#include <iostream> using namespace std; int main() { string str1,str2,str; int len1,len2,len,T,i = 0; cin>>T; while(i<T) { cin>>str1; cin>>str2; len1 = str1.length(); len2 = str2.length(); len = len1 + len2; for(int j = 0; j<len1/2; ++j) { str[j] = str1[j]; cout<<str[j]; } for(int j = 0; j<len2; ++j) { str[len1/2+j] = str2[j]; cout<<str[len1/2+j]; } for(int k = 0; k<len1/2; ++k) { str[len1/2+len2+k] = str1[len1/2+k]; cout<<str[len1/2+len2+k]; } ++i; cout<<endl; } return 0; }