CT23306

The Even Count at Vermilion

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Before the gates of the cinnabar mines of Vermilion close for winter, Botanist must finish the ingots ledger - one figure at a time. 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 <= 464; -100 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 17 962509 958446 840618 866357 532896 134457 813021 262177 169395 736570 984158 373794 334394 862079 106278 140436 337282
Output: 10

Example 2:

Input: 464 636091 157345 612497 181319 291226 260365 652983 416807 371361 686118 498258 884659 107899 840200 850030 979728 504863 374257 526726 350565 650602 787602 590840 197302 782307 360366 433357 323667 859569 861859 562647 691646 348041 283374 555311 69333 239052 419531 741717 472693 218083 643276 494826 298445 537457 384692 744148 341939 1043 820622 962908 173365 188750 248878 909965 243851 713028 173894 708761 173969 684935 144205 78162 652987 673519 861312 951725 626740 305990 566575 31941 137404 651136 907751 829029 568728 578043 835949 61995 83731 104840 15867 4013 697143 467747 642674 524270 43199 498456 786043 691512 457527 147012 986323 393853 106866 427263 317329 481997 970565 855220 369193 101588 916705 353642 672258 662599 267533 827016 733862 182335 584175 663870 998804 812096 35…
Output: 230

Example 3:

Input: 124 510931 781965 455802 194839 148270 719584 391686 713490 263287 722186 130796 798712 930447 930502 405075 469347 762932 594324 917915 488973 282795 462683 988265 45576 102382 8382 438137 137900 175776 647248 785357 980014 143881 529750 745840 948633 131058 430287 388582 904261 502674 792313 325906 788548 425938 531610 234155 257686 90731 170740 771680 705795 770690 596229 940192 771266 422085 101585 134993 671443 386363 271918 565842 841486 225685 24678 911236 337997 692325 880526 522446 136717 660784 329507 520969 750662 827586 884721 57023 930271 547666 659727 163619 6191 695594 912450 760936 397666 421768 156957 211517 103077 587573 154072 645461 97784 993774 514588 312453 494229 576215 16335 561335 12616 557500 559430 296954 335508 865521 928558 216462 860082 957210 778195 229130 29…
Output: 66

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Even Count at Vermilion - EASY Coding Problem | CodeTikki