CT1532

Zigzag tickets Even Count

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Every season at the honeycomb cliffs of Beeswick, someone must rebuild the damaged itinerary. This year the task falls to Qadir, armed only with the tickets 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 <= 98; 0 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 36 720576 179634 561362 32931 952826 980169 621699 248406 273692 167168 376616 851124 9986 731297 203243 65528 661873 561008 809327 965758 117448 14107 860055 87300 215297 563959 672317 458132 289129 89826 580313 88788 633893 14666 930208 908179
Output: 20

Example 2:

Input: 45 689522 357487 816007 712091 823331 247271 248584 443936 524639 675640 110447 154636 903842 681742 400639 876964 996782 713343 157112 898099 70307 893180 926139 215907 627712 287448 816206 975492 243544 632371 578568 249393 378293 404997 469610 761857 951904 875891 789725 121985 77735 515395 876348 657415 224517
Output: 20

Example 3:

Input: 17 849143 372765 627201 809937 380362 800673 853735 202495 387375 570399 587693 710591 537236 358712 219264 23372 592225
Output: 5

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.