#C8176. Plant Height Growth Calculation

    ID: 52129 Type: Default 1000ms 256MiB

Plant Height Growth Calculation

Plant Height Growth Calculation

You are given N plants with their initial heights. Each day, every plant doubles in height. Given the number of days D, compute the height of each plant after D days.

The relationship for the growth is given by the formula:

[ \text{final_height}_i = \text{initial_height}_i \times 2^{D} ]

For example, if there are 3 plants with initial heights [2, 3, 4] and D = 2, then each height is multiplied by \(2^2 = 4\). Thus, the final heights will be [8, 12, 16].

inputFormat

The input is read from standard input and is composed of three lines:

  1. The first line contains an integer N representing the number of plants.
  2. The second line contains an integer D representing the number of days.
  3. The third line contains N space-separated integers representing the initial heights of the plants.

outputFormat

Output to standard output a single line containing the final heights of the plants after D days. The heights should be printed as space-separated integers.

## sample
3
2
2 3 4
8 12 16