Given an array of integers. Return a non-decreasing sorted array of squares of the original numbers.
Input
The program receives as input in the first line a natural number
n
- the size of the array. The second line contains
n
integers
ai
- array elements (
1 <= n <= 103,
- 104 <= ai <= 104
).
Imprint
Output the resulting array.
Examples
# |
Input |
Output |
1 |
5
-1 -4 3 0 10
| 0 1 9 16 100 |
2 |
3
3 -1 1
| 1 1 9 |
Запрещенные операторы:sort