#K37942. Calculate Components for Widget Production

    ID: 26088 Type: Default 1000ms 256MiB

Calculate Components for Widget Production

Calculate Components for Widget Production

You are given the number of types of components n, the number of widgets m to be produced, and a list of n integers where the i-th integer represents the number of components of type i required to produce one widget.

Your task is to compute the minimum number of each component required to produce m widgets. The formula for each component is given by:

\( \text{result}_i = m \times \text{components}_i \)

For example, if n = 3, m = 5 and components = [2, 3, 1], then the required components will be [10, 15, 5].

inputFormat

The input is read from stdin and consists of two lines:

  • The first line contains two integers n and m, where n is the number of component types and m is the number of widgets to be produced.
  • The second line contains n space-separated integers, where the i-th integer is the number of components of type i needed for one widget.

outputFormat

Output to stdout a single line containing n space-separated integers, where each integer is the total number of components of the corresponding type needed to produce m widgets.

## sample
3 5
2 3 1
10 15 5

</p>