#C14446. Square Even Numbers
Square Even Numbers
Square Even Numbers
Given a list of integers, your task is to compute a new list containing only the squares of the even numbers. Specifically, for each even integer \(a\) in the input list, you need to output \(a^2\). For instance, if the input is [1, 2, 3, 4, 5, 6], then the output should be [4, 16, 36].
You must read the input from standard input and write the output to standard output.
inputFormat
The first line of input contains an integer \(n\) indicating the number of integers in the list. The second line contains \(n\) space-separated integers.
outputFormat
Output a single line that contains the squares of the even numbers (in the same order as they appear in the input) separated by a single space. If there are no even numbers, output an empty line.
## sample6
1 2 3 4 5 6
4 16 36
</p>