#K2676. Even Odd Difference
Even Odd Difference
Even Odd Difference
Given T test cases, each test case contains an integer N followed by a list of N integers. For each test case, calculate the absolute difference between the sum of the even numbers and the sum of the odd numbers. Mathematically, if \( S_{even} \) and \( S_{odd} \) denote the sum of even and odd numbers respectively in a test case, then the answer is \( |S_{even} - S_{odd}| \). Output the result for each test case on a new line.
inputFormat
The first line contains a single integer T, the number of test cases. For each test case, the first line contains a single integer N, the number of elements in the array. The second line contains N space-separated integers.
outputFormat
For each test case, output a single line containing the absolute difference between the sum of the even numbers and the sum of the odd numbers.
## sample5
4
1 2 3 4
3
10 10 9
5
1 1 1 1 1
3
2 4 6
6
3 5 7 8 10 12
2
11
5
12
15
</p>