CT27468

The Blackglass Even Count

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Morning light hits the obsidian flows of Blackglass as Hans unrolls the day's manifest of crates. The tally will decide the next shipment. 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 <= 550; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 34 188 901 624 472 160 597 483 914 108 949 683 995 861 649 969 420 192 24 15 600 709 292 352 579 191 59 558 105 662 782 666 610 313 446
Output: 18

Example 2:

Input: 24 952 828 91 127 182 608 604 760 934 972 283 766 13 343 379 208 456 567 680 288 540 713 263 810
Output: 15

Example 3:

Input: 14 832 328 173 756 923 30 272 139 121 30 356 526 417 233
Output: 8

Constraints:

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

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