#244. 字符串重复拼接

    ID: 244 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatWarmup-2gesp1循环结构

字符串重复拼接

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 ss and a non-negative integer nn, return a new string that consists of nn copies of the original string ss.

Input Format

Input is given from standard input in the following format.

The first line contains a string ss. The second line contains a non-negative integer nn.

Output Format

Output is printed to standard output in the following format.

The new string consisting of nn copies of ss.

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.