← 返回 walmartlabs 的题目列表Merge Strings Alternately
类型:online_judge
Problem: Merge Strings Alternately
Given two strings word1 and word2, merge them by adding characters alternately, starting with the first character of word1, then the first character of word2, and so on.
If one string is longer than the other, append the remaining characters of the longer string to the end of the merged result.
Input Format
word1
word2
Output Format
Print the merged string.
Constraints
1 <= len(word1), len(word2) <= 100
word1 and word2 consist of lowercase English letters.
Example
Input:
abc
pqr
Output:
apbqcr
Example
Input
abc
pqr
Output
apbqcr