CT28455

Uday and the Even Count

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The harbor bell rings at the fjord village of Deepwater; Uday weighs the day's crates manifests and starts the calculations. 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 <= 854; -100 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 495 495693662 594077617 68936652 185331947 180497527 384504046 645274156 363063704 707183280 757833519 511822907 113787627 917223439 225770846 558575537 410141079 489009808 865841285 708095182 927510767 816545711 63677269 884803324 867513691 839938135 35483675 67638090 945562040 241546071 659939553 400794386 246017986 444461605 990204904 376479592 45119089 226526891 912192185 709295411 31635228 336582293 437931405 39226200 262206649 970809190 899890485 733315143 402831211 13456562 717317003 697080968 405149442 148109716 688302390 19475865 410351059 323977154 792956124 119494819 603892104 179092805 445888610 994073758 293409641 390928878 173685032 391415933 64360424 203193772 273324312 107545905 368721254 3836749 662672911 270654169 551051551 748445787 590433364 228683500 639115023 68845506…
Output: 250

Example 2:

Input: 282 994119542 345247001 627527815 256557529 643249089 896585399 878457618 20459299 584091870 781323207 329433028 945552823 309209336 992880527 641001045 297608523 617611885 122604320 363504814 511461019 937742834 445033559 252718219 698755396 699168106 441620419 279915894 792485236 621095387 149285102 477068416 85259869 380129419 282391250 325666107 76344165 723901782 889995667 143305494 275101129 938617964 423090552 555600913 676740773 73061782 482345084 497684383 737484870 142649956 460394387 772005100 736005412 486863174 364732069 5414566 903777466 216048594 95518002 421781678 9572046 465092609 658421800 681681701 987485699 955519788 552420030 841485874 544953978 868353129 984748706 633585279 574322025 327873703 649391806 379717196 801019603 382673336 767923540 971817117 870057428 49673…
Output: 132

Example 3:

Input: 40 517169937 621216759 674077962 709034516 357697233 39897179 838619822 903089380 802102234 147742030 993067891 384223877 328633203 845040626 263215285 683109397 840711760 66129707 435592259 483472831 808623276 315154368 880401866 797408671 779342334 117675027 605276152 434524224 739138846 336724314 766453375 254363838 533834001 24885440 864007956 679158747 973016907 358630622 464929270 641949832
Output: 22

Constraints:

1 <= n <= 854; -100 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Loading...
Test Cases:No test cases
No test cases available.
Uday and the Even Count - EASY Coding Problem | CodeTikki