#K79682. Sum of Squares

    ID: 35363 Type: Default 1000ms 256MiB

Sum of Squares

Sum of Squares

You are given a list of integers. Your task is to compute the sum of the squares of each element in the list. Mathematically, for a list of elements \(a_1, a_2, \dots, a_n\), you need to compute \(\sum_{i=1}^{n}a_i^2\).

If the list is empty, then the output should be 0.

You must read input from standard input (stdin) and output the result to standard output (stdout).

inputFormat

The first line of input contains an integer n indicating the number of elements.

The second line contains n space-separated integers.

outputFormat

Output a single integer — the sum of the squares of the given numbers.

## sample
3
1 2 3
14

</p>