#C13695. Process Numbers
Process Numbers
Process Numbers
You are given a list of integers. Your task is to process these integers as follows:
- Create a list of the squares of all even numbers. (For an even number \(n\), compute \(n^2\).)
- Create a list of all odd numbers.
- Calculate the sum of the squared even numbers.
- Calculate the sum of the odd numbers.
If any element in the input is not a valid integer, your program should raise an error.
inputFormat
Input is given as a single line containing space-separated integers. An empty line indicates an empty list.
outputFormat
Output exactly five lines:
- The original list (space-separated integers).
- The list of squared even numbers (space-separated), or an empty line if there is none.
- The list of odd numbers (space-separated), or an empty line if there is none.
- The sum of the squared even numbers.
- The sum of the odd numbers.## sample
1 2 3 4 5 6
1 2 3 4 5 6
4 16 36
1 3 5
56
9
</p>