CT1471

The Faded coins of Urmila

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

In the rookery of Crowhaven, Urmila the auditor keeps careful count of the coins. rebuild the damaged itinerary, every figure matters. 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 <= 33; -1000000 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 22 -412354 -533404 -627153 -409224 -534239 -939581 -832196 -18000 -908455 -995062 -619644 -562082 -650922 -987201 -293793 -447933 -22186 -895309 -226216 -900483 -716559 -603948
Output: 12

Example 2:

Input: 18 -8547 -829170 -726938 -161547 -745074 -704271 -629460 -360292 -49444 -215480 -108390 -367151 -905679 -556772 -227023 -185534 -866758 -423817
Output: 11

Example 3:

Input: 11 -327366 -935450 -21542 -761309 -915453 -344355 -473204 -535096 -471704 -604155 -682031
Output: 6

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Faded coins of Urmila - EASY Coding Problem | CodeTikki