#B4063. Count Odd and Even Numbers
Count Odd and Even Numbers
Count Odd and Even Numbers
Given n positive integers, determine how many are odd and how many are even. A number is odd if it satisfies the congruence ; otherwise, it is even.
inputFormat
The first line contains an integer $n$ ($1 \leq n \leq 10^5$), representing the number of integers. The second line contains $n$ positive integers separated by spaces.
outputFormat
Output two integers separated by a space: the count of odd numbers and the count of even numbers.
sample
5
1 2 3 4 5
3 2