CT27347

Seth's Faded lanterns

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The paymaster Seth has been asked to tally the donation drive. 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 <= 443; 0 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 271 942092 474031 249761 443312 833873 3074 93639 635219 256939 926007 148576 70635 554556 777826 288510 915822 573679 559157 517999 517491 458433 48539 945715 293263 333618 86496 316605 778116 450665 804004 54895 308176 106833 88127 131269 182576 231036 417528 958461 23747 114208 128916 439836 971778 459466 561735 811408 228712 103635 376579 43033 770065 492078 99573 574525 395302 983928 445679 373587 476884 899366 941730 776443 489142 858706 682100 796564 168183 548589 577954 961613 326333 87712 764808 134615 851450 447874 234539 293187 356177 510059 838830 681098 613987 320823 479942 552742 280539 816101 27407 627312 709232 853287 586253 732649 821234 381314 979099 173201 196949 880566 742768 784598 721808 617435 174084 633869 636604 301843 916953 313356 362533 377453 509286 548407 8621…
Output: 139

Example 2:

Input: 18 443179 293692 314296 450912 820081 758018 247634 518064 705888 915287 208502 464772 816092 509179 16362 501107 489647 231486
Output: 12

Example 3:

Input: 283 831822 119656 609469 786144 724112 352145 754680 922851 340505 842714 347213 288185 709236 905215 828966 923636 879297 408660 899140 233228 933435 105743 143614 688770 851359 931138 535380 651837 434610 210783 893341 693946 995839 740901 320384 773893 153175 955047 647636 193765 43131 163098 344869 553082 145041 994108 852833 744830 112540 106959 545175 343524 353114 135705 940255 830620 853878 88310 440041 262986 967738 670328 955015 156392 224224 200052 221255 227049 955497 437877 988547 464412 524998 577699 644572 12366 210909 658348 134259 865961 337249 308183 642891 354041 262792 741868 473081 601433 750715 587206 36035 392651 202716 915305 11877 850225 427853 109041 46468 946587 190738 471424 161133 362291 851919 362532 722466 514225 25224 239141 403811 381140 840017 633356 71954…
Output: 148

Constraints:

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

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