#C12841. Cube of Even Numbers

    ID: 42313 Type: Default 1000ms 256MiB

Cube of Even Numbers

Cube of Even Numbers

Given a list of integers, your task is to calculate the cube (x^3) for each even integer (x) in the sequence. The cubes should appear in the same order as their corresponding integers in the input. If there are no even integers, output an empty line.

In mathematical terms, for each integer (x) in the list, if (x \bmod 2 = 0), compute (x^3) and include it in the result.

inputFormat

The input consists of two lines:
1. The first line contains an integer (n) representing the count of numbers.
2. The second line contains (n) space-separated integers.

outputFormat

Print a single line with the cubes of the even integers, separated by a space. If no even integers exist, print an empty line.## sample

6
1 2 3 4 5 6
8 64 216