P18245 [GeeksforGeeks] Count odd even
普及-
题目描述

Given an array A[] of N elements. The task is to count number of even and odd elements in the array.
Example:
Input:
N = 5
A[] = 1 2 3 4 5
Output:
3 2
Explanation:
There are 3 odd elements (1, 3, 5)
and 2 even elements (2 and 4).
Your Task:
Your task is to complete the function countOddEven() which should print number of odd and number of even elements in a single line seperated by space.
Print a newline at the end of output.
Constraints:
1 <= N <= 10^{6}
1 <= A_{i} <= 10^{6}

输入格式

见题面

输出格式

见题面

样例输入
N = 5 A[] = 1 2 3 4 5
样例输出
3 2