#K80552. Filter and Multiply Even Numbers

    ID: 35555 Type: Default 1000ms 256MiB

Filter and Multiply Even Numbers

Filter and Multiply Even Numbers

You are given a list of integers. Your task is to filter out the even numbers and then multiply each even number by 3. In other words, for each integer \(x\) in the list, if \(x \bmod 2 = 0\) then the result should include \(3 \times x\). If there are no even numbers, print an empty line.

The input begins with a positive integer \(n\) which represents the number of elements in the list, followed by a line with \(n\) space-separated integers. The output should be the transformed even numbers printed in the order they appear in the input, separated by a single space.

inputFormat

The first line contains a single integer \(n\) (where \(0 \le n \le 10^5\)) indicating the number of integers in the list. The second line contains \(n\) space-separated integers.

outputFormat

Print the even numbers from the list after multiplying each by 3, separated by a space. If there are no even numbers, output an empty line.

## sample
3
2 4 6
6 12 18