CT1035

Nyssa's ingots Reckoning

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Caravans arrive at the snowberry thicket of Winterholt with crates of ingots, and Nyssa the registry keeper must account for every last one. 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; -1000000 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 57 696269869 572728755 542011529 854606977 922471645 179731493 375889260 590014927 120852345 437854738 714427401 328833560 148425529 226665178 100812848 582720175 350917254 554482035 91636362 747770853 224727491 268214896 332150848 494274033 499195862 840714440 354729803 997706576 493402887 75887661 810085922 24327329 534993092 821670648 315711903 988782074 662713724 816758420 141019866 910550994 938852812 825795908 763127468 62292275 882364247 133660970 436857053 463392589 964000486 602033782 388238399 945483610 974875740 615132972 686140356 728187023 338280934
Output: 31

Example 2:

Input: 9 265118029 488577895 610187434 670654987 201663391 871918852 445545714 400837623 745260331
Output: 3

Example 3:

Input: 13 506162154 34218538 84967871 315247454 225996445 414213107 21009807 664397245 747547439 936408272 884841809 557229108 928535612
Output: 6

Constraints:

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

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