#C14251. Square and Reverse List
Square and Reverse List
Square and Reverse List
You are given an integer n and a list of n integers. Your task is to square each integer and then output the squared values in reverse order.
In other words, if you have a list: \(a_1, a_2, \ldots, a_n\), you must compute \(a_i^2\) for each element and then output the list in the order \(a_n^2, a_{n-1}^2, \ldots, a_1^2\).
inputFormat
The first line of the input contains an integer n, denoting the number of integers.
The second line contains n space-separated integers.
outputFormat
Output a single line with the squared numbers in reverse order, separated by a space.
## sample5
1 2 3 4 5
25 16 9 4 1
</p>