Sum of squares of even numbers
TypeScript
Easy
math
Task «Sum of squares of even numbers»
Write a program that takes an integer N, then N integers. Calculate the sum of squares of only the even numbers from the input. If there are no even numbers, output 0.
Input Format
The first line contains an integer N (1 ≤ N ≤ 100). The second line contains N integers separated by spaces, each with an absolute value not exceeding 1000.
Output Format
One integer — the sum of squares of even numbers.
Examples
Example 1
INPUT
123
OUTPUT
0
main.ts