#C8898. Count Odd Height Trees
Count Odd Height Trees
Count Odd Height Trees
You are given T test cases. In each test case, you are given an integer N and a sequence of N integers where each integer represents the height of a tree. Your task is to count the number of trees with odd height. A tree is considered to have an odd height if its height satisfies the property \(height \mod 2 \neq 0\).
For example, if a test case is given as:
5 3 4 7 6 9
Then the count of trees with odd height is 3.
inputFormat
The input is read from standard input (stdin). The first line contains an integer T, the number of test cases. Each test case consists of two lines. The first line contains an integer N, the number of trees. The second line contains N space-separated integers representing the heights of the trees.
outputFormat
For each test case, output a single integer on a new line representing the count of trees with odd height.## sample
2
5
3 4 7 6 9
4
2 4 8 10
3
0
</p>