#271. 字符串按长度拼接
字符串按长度拼接
Short Long Short String
Background
Congcong is learning how to manipulate strings and wants to try a special concatenation method.
Problem Description
Given two strings, and , return a string of the form short+long+short, with the shorter string on the outside and the longer string on the inside. The strings will not be the same length, but they may be empty (length ).
Input Format
Input is given from standard input in the following format.
Two strings and , separated by a space.
Output Format
Output is printed to standard output in the following format.
The concatenated string.
Sample
Hello hi
hiHellohi
hi Hello
hiHellohi
aaa b
baaab
Sample Explanation
For Sample 1, string "Hello" has length , and string "hi" has length . The shorter string is "hi\