cswork / OA打开练习工作台

其他OA #9

Count Even Numbers

简单可在线判题

考点(AI 标注)原地数组

Count the even numbers in an integer array. Although the source sentence is truncated, the constraints and three examples fully determine how negative numbers, 0, and the empty array are handled.

输入格式

The first line contains n (0≤n≤1000), and the second line contains n integers in the range −100000..100000.

输出格式

Output the number of even numbers in the array.

样例 1

输入:

5
1 2 4 7 10

输出:

3

样例 2

输入:

0

输出:

0

样例 3

输入:

5
-3 -2 0 5 8

输出:

3