#K73622. Concatenate Messages

    ID: 34017 Type: Default 1000ms 256MiB

Concatenate Messages

Concatenate Messages

You are given \(T\) test cases. For each test case, you are given a string \(S\) and an integer \(N\). Your task is to output a new string that is equivalent to concatenating \(S\) with itself \(N\) times (i.e. the string \(S\) repeated \(N\) times).

For example, if \(S = \texttt{Hello}\) and \(N = 3\), then the output should be \(\texttt{HelloHelloHello}\).

This problem tests your ability to parse input and manipulate strings.

inputFormat

The input is read from standard input (stdin) and is formatted as follows:

  • The first line contains an integer \(T\), the number of test cases.
  • Each of the following \(T\) lines contains a string \(S\) and an integer \(N\) separated by a space. Note that \(S\) may not contain spaces.

outputFormat

For each test case, output on a new line the result of concatenating the string \(S\) \(N\) times. The output is written to standard output (stdout).

## sample
3
Hello 3
HappyFestive 2
Greetings 4
HelloHelloHello

HappyFestiveHappyFestive GreetingsGreetingsGreetingsGreetings

</p>