CT25129

Last lanterns of Wasim

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The surveyor Wasim has been asked to reorganize the archive shelves. On the desk lies a long table of lanterns readings. 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 <= 548; -100 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 458 402491 149913 556905 724464 681625 777535 951049 651068 178208 677107 214315 655834 646913 874601 56076 179180 160597 472419 47590 22672 307448 138266 111616 954370 431063 197390 755970 597877 670245 586223 177673 619099 516221 301909 763949 539733 616115 49169 864752 466649 184319 554042 978409 736019 209492 93067 99920 801441 988790 661584 624168 214029 438322 458831 807596 57142 579361 551690 677877 936868 68029 488962 288059 359791 683034 873879 298010 89206 904992 593584 778963 399613 323425 602498 947191 867027 497489 642189 727118 27724 127081 876455 809796 473901 395247 429061 973731 40340 771032 338858 448794 330696 82417 546305 212846 889464 604289 816231 697576 360730 105583 536975 73396 123713 36559 986256 596358 638979 114431 728842 13021 317799 948697 80913 298396 176224 …
Output: 225

Example 2:

Input: 25 680761 49304 693723 967994 479891 539423 583316 396767 851081 21447 75630 823016 531061 636772 728854 785840 87781 317950 310965 366101 560706 812268 890912 187733 912668
Output: 13

Example 3:

Input: 187 198939 399889 36074 897594 184504 449996 904749 19877 447653 321388 287792 414351 16242 803916 794787 573092 843238 644823 792751 95980 904469 702747 307012 184499 825035 854868 968042 187144 599975 239504 186951 261031 867639 775173 641299 157725 52880 864834 267814 593475 303754 788177 681310 454805 66304 543328 828022 517585 30397 322330 432997 856080 234763 888739 950495 614734 685250 730974 615914 203554 77754 914368 938770 737401 327322 124094 826195 887117 621236 248219 325978 396776 480220 899798 691044 130989 738855 861359 910603 475104 299835 694115 351192 660429 546257 751414 740873 172286 831532 396067 513933 125500 634358 367709 26597 481616 543229 760112 795322 708255 778074 43152 635655 598458 550509 269335 10487 526865 299738 696259 783862 131030 947518 875401 948714 42…
Output: 90

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Last lanterns of Wasim - EASY Coding Problem | CodeTikki