#C11037. Repeat Strings

    ID: 40309 Type: Default 1000ms 256MiB

Repeat Strings

Repeat Strings

You are given a list of strings and an integer \(k\). Your task is to generate a new list where each string is repeated consecutively \(k\) times. If \(k\) is less than or equal to zero, the output should be an empty list.

For example, if the input list is ["a", "b", "c"] and \(k=3\), the output should be ["aaa", "bbb", "ccc"].

inputFormat

The input consists of multiple lines. The first line contains an integer (n), representing the number of strings. The next (n) lines each contain one string. The following line contains the integer (k) which indicates how many times each string should be repeated.

outputFormat

Output the resulting list of repeated strings, each on a separate line. If the list is empty, output nothing.## sample

3
a
b
c
3
aaa

bbb ccc

</p>