#C5978. Concatenation and Length
Concatenation and Length
Concatenation and Length
You are given a string (s) and a non-negative integer (n). The task is to concatenate the string (s) with itself (n) times and then output the resulting string along with its length. In other words, you need to compute the string
[ \underbrace{s ; s ; \cdots ; s}_{n\text{ times}} ]
For example, if (s = \texttt{xyz}) and (n = 4), the resulting string will be (\texttt{xyzxyzxyzxyz}) and its length is 12. Solve this problem by reading input from standard input (stdin) and writing the result to standard output (stdout).
inputFormat
The input consists of two lines. The first line contains the string (s) (which may be empty). The second line contains a non-negative integer (n) ((0 \leq n \leq 10^5)).
outputFormat
Output two lines: the first line should be the concatenated string ((s) repeated (n) times), and the second line should be the integer representing the length of the concatenated string.## sample
xyz
4
xyzxyzxyzxyz
12
</p>