CT23939

Leon's scrolls Even Count

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Before the gates of the seal rocks of Barking Cove close for winter, Leon must finish the scrolls ledger - one figure at a time. 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 <= 370; -1000000 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 59 -709317 -423654 -550690 -967542 -746665 -489177 -514435 -428384 -475418 -941426 -69598 -80930 -828845 -970108 -563866 -126837 -967255 -311219 -229882 -770483 -228337 -864595 -898489 -47930 -462742 -383855 -417103 -199556 -79894 -880583 -941266 -12684 -229522 -127457 -854408 -678041 -40917 -569239 -197222 -958403 -655727 -49787 -861219 -665201 -790882 -283729 -167877 -607026 -295531 -277110 -134760 -905585 -204678 -439561 -747885 -543924 -557653 -82869 -838982
Output: 27

Example 2:

Input: 13 -825275 -472882 -17159 -242222 -572408 -505965 -223578 -967333 -896307 -66376 -476330 -809686 -603089
Output: 7

Example 3:

Input: 14 -778086 -710 -542710 -114628 -251839 -609410 -305549 -280109 -683372 -861340 -974092 -850328 -116309 -180677
Output: 9

Constraints:

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

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