#C13695. Process Numbers

    ID: 43261 Type: Default 1000ms 256MiB

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:

  1. The original list (space-separated integers).
  2. The list of squared even numbers (space-separated), or an empty line if there is none.
  3. The list of odd numbers (space-separated), or an empty line if there is none.
  4. The sum of the squared even numbers.
  5. 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>