#C12287. Process Odd Squares
Process Odd Squares
Process Odd Squares
You are given a list of integers. Your task is to compute the squares of all odd numbers in the list, remove any duplicates, and then output the squares in descending order.
Input Format: A single line containing a space-separated list of integers. The list may be empty.
Output Format: A single line with the resulting squares of the odd numbers sorted in descending order, separated by spaces. If no odd numbers are present, output an empty line.
Note: The square of a number \(x\) is defined as \(x^2\).
inputFormat
The input consists of a single line with space-separated integers. For example:
1 2 3 4 5 3 1 7
outputFormat
The output is a single line containing the squares of all odd numbers from the input, with duplicates removed, sorted in descending order. For example:
49 25 9 1## sample
1 2 3 4 5 3 1 7
49 25 9 1
</p>