地址:http://acm.hdu.edu.cn/showproblem.php?pid=2567
题意:中文。没啥好说的。
代码:
1 # include <stdio.h> 2 # include <string.h> 3 4 5 int main () 6 { 7 int T, i, len ; 8 char s1[55], s2[55] ; 9 scanf ("%d", &T) ; 10 while (T--) 11 { 12 scanf ("%s%s", s1, s2) ; 13 len = strlen(s1) ; 14 for (i = 0 ; i < len/2 ; i++) putchar (s1[i]) ; 15 for (i = 0 ; s2[i] ; i++) putchar (s2[i]) ; 16 for (i = len/2 ; s1[i] ; i++) putchar (s1[i]) ; 17 putchar ('\n') ; 18 } 19 return 0 ; 20 }