#K42627. Sum of Squares

    ID: 27130 Type: Default 1000ms 256MiB

Sum of Squares

Sum of Squares

You are given a single line of input containing space-separated non-negative integers. Your task is to calculate the sum of the squares of these integers. In mathematical terms, if the input integers are \(a_1, a_2, \ldots, a_n\), then you need to compute:

\(\sum_{i=1}^{n} a_i^2\)

For example, if the input is "1 2 3", the result should be \(1^2 + 2^2 + 3^2 = 14\).

inputFormat

The input is provided as a single line containing space-separated non-negative integers.

Example:
1 2 3

outputFormat

Output a single integer which is the sum of the squares of the input integers.

Example:
14
## sample
1 2 3
14