#K60192. Smallest Concatenated Number

    ID: 31032 Type: Default 1000ms 256MiB

Smallest Concatenated Number

Smallest Concatenated Number

You are given two integers \(N\) and \(K\). The task is to construct the smallest possible number by concatenating exactly \(K\) integers chosen from the interval \([1, N]\). In this particular problem, the smallest concatenated number you can form is simply a string composed of the digit '1' repeated \(K\) times.

Note: Regardless of the value of \(N\), the smallest number formed by \(K\) integers from the available range is always \(1\) repeated \(K\) times. This is because the smallest integer in the given range is \(1\).

Example: For \(N=10\) and \(K=4\), the output is 1111.

inputFormat

The input consists of a single line with two space-separated integers (N) and (K), where (N) is the upper bound of the range (inclusive) and (K) is the number of integers to concatenate.

outputFormat

Output a string representing the smallest concatenated number, which is the digit '1' repeated exactly (K) times.## sample

5 3
111