CT915

The Even Count at Goldmeadow

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

In the trading post of Goldmeadow, Opal the reckoner keeps careful count of the crates. Schedule the next expedition, 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 <= 78; -1000000 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 35 -496838 -263003 -303688 -923075 -850141 -980022 -464586 -132472 -814944 -147622 -571712 -691271 -709718 -629175 -84241 -356344 -650849 -754662 -915457 -94759 -855265 -802765 -574792 -773428 -566407 -812130 -775720 -495148 -304819 -744973 -267970 -649609 -737074 -259828 -507592
Output: 20

Example 2:

Input: 13 -361362 -122363 -147028 -865214 -623727 -855302 -90502 -495717 -808551 -526891 -649024 -346406 -709872
Output: 8

Example 3:

Input: 78 -768454 -896445 -372748 -705818 -22007 -726381 -287097 -642895 -785938 -209766 -885008 -593570 -924767 -843834 -262681 -930494 -805713 -512023 -601087 -112247 -378251 -166057 -519871 -365640 -615154 -676647 -323448 -934139 -299717 -927973 -917195 -952307 -99353 -197702 -815993 -745120 -780331 -374740 -118955 -56833 -894782 -709688 -361697 -460818 -557840 -984017 -163829 -324870 -867710 -662487 -686658 -714485 -550065 -69770 -750892 -604147 -544074 -379820 -671517 -579978 -486972 -632316 -111379 -931735 -484385 -332126 -549474 -437309 -945928 -96997 -757485 -565563 -183244 -677235 -220492 -33978 -785775 -133017
Output: 35

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Even Count at Goldmeadow - EASY Coding Problem | CodeTikki