CT22007

The Bramblecourt Even Count

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Every season at the thorn maze of Bramblecourt, someone must reorganize the archive shelves. This year the task falls to Quin, armed only with the readings register. 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 <= 249; -1000000 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 74 -78980 -167367 -218885 -911443 -596377 -724815 -148512 -171187 -341937 -690354 -464450 -309976 -131900 -711271 -365247 -597997 -390896 -779682 -594630 -258795 -121675 -511209 -551553 -542884 -164242 -58908 -317943 -329127 -684964 -575927 -704055 -696736 -820919 -877942 -310992 -51957 -747118 -6031 -109260 -723887 -275038 -130355 -361205 -868623 -872375 -879109 -743945 -560437 -539293 -491911 -389272 -426636 -208425 -453175 -428725 -492727 -626622 -220709 -457342 -495799 -538499 -937199 -327565 -314786 -874151 -606068 -504299 -666627 -953314 -701096 -26704 -902324 -255926 -560447
Output: 30

Example 2:

Input: 66 -801337 -276711 -785745 -394638 -957061 -182404 -726223 -217751 -414120 -974690 -170366 -869802 -332634 -854003 -1914 -672216 -331492 -933986 -704624 -213185 -243930 -212581 -475574 -39344 -114741 -892659 -621731 -505007 -453270 -989572 -542148 -554434 -472616 -483116 -686275 -582824 -502950 -946129 -92513 -193451 -451486 -267836 -505537 -547825 -732168 -751394 -815491 -536835 -742190 -715211 -227662 -895535 -608053 -21787 -54956 -767925 -181690 -330194 -605673 -227128 -792013 -723804 -792369 -830340 -465155 -601579
Output: 35

Example 3:

Input: 238 -628518 -611071 -834046 -619507 -973657 -993568 -439401 -850910 -840512 -239260 -678264 -90528 -105749 -178882 -472550 -815271 -774812 -540448 -848646 -64700 -348274 -158916 -407480 -860975 -435710 -52099 -164019 -983505 -261017 -469463 -434203 -352320 -751973 -412367 -33281 -426492 -925420 -370532 -388219 -81582 -381845 -694213 -701070 -633885 -318720 -955332 -981130 -73699 -78996 -320315 -214391 -172201 -154812 -113993 -213809 -542011 -612354 -170506 -37908 -333593 -178604 -999175 -213593 -194008 -603756 -786420 -87338 -877532 -720244 -724686 -306038 -325984 -457100 -823948 -275544 -471719 -205033 -347689 -298090 -892373 -719864 -932691 -547708 -28934 -658666 -839653 -972635 -835760 -760928 -762229 -417842 -189502 -384798 -503586 -410571 -505030 -900996 -832879 -757379 -214793 -233721 -204584 -679948 -963198 -191155 -502807 -742530 -401279 -864692 -213165 -566864 -796411 -995292 -459883 -30452 -424919 -39070 -677276 -558653 -316711 -460118 -780519 -99033 -601502 -360466 -72344 -463895 -428805 -110098 -219488 -333477 -58805 -978360 -84005 -742090 -758989 -916710 -540739 -738867 -67838 -961255 -547097 -751034 -915769 -319912 -518023 -771638 -757577 -242852 -963934 -40323 -244214 -922813 -982286 -350041 -184565 -583427 -921012 -907009 -917320 -811580 -679009 -7567 -311860 -533805 -305726 -476973 -810938 -897781 -684669 -267691 -345947 -697163 -369952 -259256 -522194 -651505 -759121 -704014 -885669 -561694 -628168 -141550 -252818 -482162 -73603 -844736 -885317 -734854 -505372 -677621 -768583 -628271 -346416 -995326 -508350 -334539 -113085 -325353 -80833 -841701 -159644 -98456 -512026 -681915 -637646 -831563 -21107 -764732 -74806 -575061 -886936 -717519 -300509 -156604 -65278 -210936 -569139 -891057 -125592 -202366 -86142 -504570 -550226 -908586 -212564 -699446 -742035 -103565 -444163 -877034 -549156 -966959 -934749 -627440 -985632 -507274 -370807
Output: 129

Constraints:

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

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