#C12793. Transform List
Transform List
Transform List
You are given a list of integers. For each integer \(x\), if \(x\) is even, compute \(x^2\); if \(x\) is odd, compute \(x^3\). In other words, the transformation is defined as follows:
\[ T(x)=\begin{cases} x^2,& \text{if } x \text{ is even}\\ x^3,& \text{if } x \text{ is odd} \end{cases} \]
Your task is to read a list of integers from standard input, perform the appropriate transformation on each integer, and output the resulting list in the same order with each element separated by a space.
inputFormat
The input is given from standard input as a single line containing one or more integers separated by spaces.
outputFormat
Print the transformed integers to standard output in one line, separated by a single space.
## sample2 3 4 5
4 27 16 125