#244. 字符串重复拼接
字符串重复拼接
String Repetition
Background
Congcong is currently learning about string operations. He wants to write a program that can repeat a given string multiple times.
Problem Description
Given a string and a non-negative integer , return a new string that consists of copies of the original string .
Input Format
Input is given from standard input in the following format.
The first line contains a string . The second line contains a non-negative integer .
Output Format
Output is printed to standard output in the following format.
The new string consisting of copies of .
Sample
Hi
2
HiHi
Hi
3
HiHiHi
Hi
1
Hi
Sample Explanation
In Sample 1, the string "Hi" repeated 2 times results in "HiHi". In Sample 2, the string "Hi" repeated 3 times results in "HiHiHi". In Sample 3, the string "Hi" repeated 1 time results in "Hi".
Constraints
Time limit: 1 second per test case. Memory limit: 1024 KiB per test case.