CT26053

The Even Count at Whitestone

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

At the alabaster quarry of Whitestone, Freya records each readings in a worn leather ledger. The guild wants answers, not guesses. 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 <= 365; 0 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 182 206944 869402 21020 30133 240671 457873 597651 803254 197728 526222 406923 773671 269411 982515 414724 352973 71439 750516 180996 109058 486707 772211 835445 395504 356140 144559 632690 159379 577360 938990 929010 622508 587089 63410 562395 134602 785485 740692 251702 227286 275468 382328 582664 238273 879934 204582 832470 962340 381579 209759 128503 980129 283603 635548 239494 823769 85537 146031 645898 868701 365622 134687 831882 288934 892847 603241 630137 357325 587564 54344 34149 826893 58665 879795 488782 982807 138434 263653 428148 83387 431473 369583 387688 126945 186467 2889 727485 296913 750315 969251 448741 191864 294654 41755 95700 814405 945729 93132 476608 766063 910899 346778 965955 463649 545585 743198 655730 917511 41232 557542 243577 914991 859929 44209 147017 903346 …
Output: 81

Example 2:

Input: 132 781120 633453 203041 603447 449366 829469 601469 258814 335079 792436 875554 579300 151598 51244 190794 463087 536673 527067 343095 466640 152198 170362 839734 337344 382746 569096 384621 577139 834639 868681 22616 599226 258494 527667 641287 874862 300284 898301 237761 592499 13950 139229 831075 389543 192227 625414 491569 555780 124624 677661 58215 503441 47575 532953 994682 848632 655262 303651 293227 335254 150858 667103 996426 497895 428481 141227 824853 739495 368293 657802 509759 17721 972299 787500 338379 759835 478090 974063 86512 221463 744392 424143 12679 505972 41743 602161 245560 338424 273928 101350 681877 472627 597504 660229 850320 54458 176666 602821 388790 213662 444516 558156 498811 351009 289311 994822 364843 373429 269715 912295 630381 489932 174913 448183 59055 28…
Output: 59

Example 3:

Input: 333 518016 741206 605252 5656 369177 83485 423075 859575 75435 188739 924643 525815 314910 468698 103043 456580 857584 385557 800478 390947 21052 663892 570826 745550 375580 732871 974250 756067 945294 163795 650582 121032 213000 229383 328917 449222 296541 53181 930548 667067 733922 973716 905924 8210 826239 349586 584125 653224 492950 426410 197816 41432 829087 427752 993968 715370 152244 761931 941674 264945 414074 25411 109667 258626 717538 383424 621063 653163 311833 505282 938017 253079 582713 973960 674682 512724 557416 741421 946506 450131 196098 750669 185675 819619 411068 314075 25267 28335 862171 85049 992475 494880 108106 906505 672857 418592 180551 610617 304571 976799 207382 384467 297887 348193 185200 10947 633546 962279 213165 348387 394443 793449 117249 211528 716790 51105…
Output: 171

Constraints:

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

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