#K3136. Extracting Odd Number Squares

    ID: 24892 Type: Default 1000ms 256MiB

Extracting Odd Number Squares

Extracting Odd Number Squares

You are given a list of integers. Your task is to filter out the odd numbers from the list and output their squares in the same order as they appear.

An integer n is considered odd if it satisfies the equation \( n \mod 2 \neq 0 \). For each odd number \( x \) from the input, compute \( x^2 \) and output the results as a space‐separated list on a single line.

Example:

Input:
5
1 2 3 4 5

Output: 1 9 25

</p>

If there are no odd numbers, output an empty line.

inputFormat

The input is provided via stdin and consists of two lines:

  • The first line contains an integer \( n \) denoting the number of elements in the list.
  • The second line contains \( n \) space-separated integers.

outputFormat

Output the squares of the odd numbers in a single line separated by spaces to stdout. If there are no odd numbers in the input, output an empty line.

## sample
5
1 2 3 4 5
1 9 25

</p>