#C5629. Discount Application on Prices

    ID: 49299 Type: Default 1000ms 256MiB

Discount Application on Prices

Discount Application on Prices

You are given an integer n representing the number of flower types and a list of n prices. Your task is to apply a 20% discount to every second price in the list (i.e. the price at positions 2, 4, 6, ...). After applying the discount, round the discounted price to the nearest integer using the standard rounding method.

The mathematical formula for the discounted price is given by:

$$price_{discounted} = \mathrm{round}(price \times 0.8)$$

Print the final list of prices with the appropriate discount applied on the discounted positions. The output should list the prices separated by a space.

inputFormat

The input consists of two lines:

  • The first line contains an integer n representing the number of flower types.
  • The second line contains n space-separated integers representing the original prices.

outputFormat

Output a single line containing n space-separated integers that represent the final prices after applying the discount to every second price and rounding the result.

## sample
5
100 200 300 400 500
100 160 300 320 500