CT1534

Jessa's Even Count Ledger

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Jessa runs the kiln at the anvil district of Hammerfall. Today the books show a list of ingots, and the numbers must be worked out before sundown. 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 <= 50; 0 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 30 2 7 0 2 6 0 7 5 3 7 8 7 7 6 9 0 10 5 3 4 9 7 0 7 8 4 8 8 8 5
Output: 16

Example 2:

Input: 33 2 8 10 2 4 0 4 4 5 7 4 2 10 5 2 1 6 6 7 10 9 0 3 8 7 0 10 10 9 8 4 1 2
Output: 23

Example 3:

Input: 8 8 4 3 9 2 4 7 9
Output: 4

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Jessa's Even Count Ledger - EASY Coding Problem | CodeTikki