Easyloopsmath
Even and Odd Count
Time limit 2 s · Memory 64 MBAcceptance: —Solved by: 0
Statement
The first line contains n, the second line contains n integers. Print two numbers on one line separated by a space: how many of them are even and how many are odd. Zero counts as even.
Examples
Example 1
Input
5 1 2 3 4 5
Output
2 3
Example 2
Input
3 2 4 6
Output
3 0
Constraints
- 1 ≤ n ≤ 10^5
- -10^9 ≤ a_i ≤ 10^9