#K82122. Sum of Even Integers
Sum of Even Integers
Sum of Even Integers
You are given T test cases. Each test case consists of a positive integer N followed by a sequence of N integers. Your task is to compute the sum of all even integers in each test case.
For each test case, calculate the sum using the formula:
$$S = \sum_{i=1}^{N} \left\{ a_i \;\text{if}\; a_i \equiv 0 \; (\bmod\; 2) \right\}
Print the result for each test case in a new line.
inputFormat
The first line of the input contains an integer T, the number of test cases. For each test case, the first line contains an integer N representing the number of integers in the test case. The next line contains N space-separated integers.
Input is provided via standard input (stdin).
outputFormat
For each test case, output a single line containing the sum of even integers in that test case.
Output must be written to standard output (stdout).
## sample3
5
1 2 3 4 5
4
-8 11 20 -19
3
0 0 0
6
12
0
</p>