CT25938

The Even Count of the Brass ingots

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

It is audit day at the cotton rows of Whitewick. Botanist spreads the ingots records across the table and picks up a sharp pencil. Task: Read n integers and print how many are even. Input format: First line: n. Second line: n space-separated integers. Output format: Print the count of even values. Constraints: 1 <= n <= 733; 0 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 5 0 4 5 1 0
Output: 3

Example 2:

Input: 60 1 2 9 7 9 5 7 7 8 8 1 2 7 8 7 9 1 7 7 3 4 7 0 6 4 0 2 8 4 0 10 6 10 4 9 5 7 10 2 0 2 9 5 7 4 5 2 10 5 2 7 0 6 4 8 10 2 0 8 5
Output: 34

Example 3:

Input: 221 7 6 2 9 5 2 1 4 5 6 8 9 0 9 9 4 5 9 10 5 3 9 9 6 9 0 6 0 4 6 10 7 2 9 3 10 6 8 2 6 7 1 9 7 9 1 3 8 6 10 1 1 10 2 8 6 1 5 5 9 5 2 2 4 8 1 8 7 1 4 4 7 2 4 3 3 10 9 3 1 0 1 10 8 5 7 6 9 3 10 5 10 10 8 1 9 0 10 5 9 5 5 10 9 5 10 3 8 1 1 7 4 9 1 6 8 10 9 4 5 8 4 9 8 1 9 6 7 4 1 2 7 2 5 5 9 10 3 6 5 2 9 1 2 6 10 7 10 5 2 10 7 3 8 8 10 2 5 7 10 7 4 4 0 4 10 2 7 10 9 3 2 5 5 2 4 10 2 6 5 7 9 2 9 10 7 8 4 1 2 1 2 7 2 7 10 4 0 2 3 3 4 5 9 5 9 0 5 9 1 1 8 6 7 2 4 7 10 3 7 10
Output: 110

Constraints:

1 <= n <= 733; 0 <= a[i] <= 10; answers fit a signed 64-bit integer.

Loading...
Test Cases:No test cases
No test cases available.