#271. 字符串按长度拼接

    ID: 271 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatString-1gesp3字符串条件结构

字符串按长度拼接

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, aa and bb, 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 00).

Input Format

Input is given from standard input in the following format.

Two strings aa and bb, 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 55, and string "hi" has length 22. The shorter string is "hi\