CT23173

The Radiant tickets of Zane

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The reckoner Zane has been asked to settle a dispute between crews. On the desk lies a long table of tickets 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 <= 611; -1000000 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 154 18814 323044 -788026 618340 -798954 -371505 934359 667320 -899464 124106 96894 -489181 -381977 -346275 -388572 -778690 -167593 760213 292405 -553030 -567577 765440 318309 -432653 -787767 84535 519174 76593 -226472 -153374 524457 -207376 269849 736642 137842 742302 -871524 444199 45089 -834455 177007 -285636 -527379 -403026 -703885 -984093 -894796 595485 177699 -297431 -180471 -657395 -329642 878748 -358214 68792 -857754 6290 -153317 234621 235374 40411 415232 -674979 489939 -905046 -808935 -857823 260073 -862631 -729064 -502052 821196 -951258 681191 323339 -899113 243959 586425 238424 958751 474158 156813 584593 956107 579132 513592 -857634 -914537 735909 -402704 151729 880605 280513 886974 828310 858303 614415 632099 27642 -963403 -191603 -339388 -77915 746995 -554999 -551685 -514888 -74493 877901 624640 79038 685281 269172 -252690 968602 976153 839082 235402 233247 623567 -522252 763765 -506551 879878 -256220 -816308 396582 70557 -458579 -199614 -400855 525820 -897987 222309 750089 25271 -319308 -615012 -530494 786480 -814841 -967729 10072 379789 902311 355126 153134 -494974 261561 -348459 -372714 -269794 -935900
Output: 73

Example 2:

Input: 257 -153245 -359660 97853 241857 -593971 -743083 750583 869225 -583470 -854414 955460 -590535 467368 49709 -796864 429793 444967 -470758 567305 915291 565428 -200697 566435 835144 244095 516984 -166855 35880 42970 885276 990686 814680 146115 -917904 -450014 -197962 24750 -510397 685445 155940 -128691 -98848 696964 913288 583217 361003 -74663 872343 211658 256501 229107 -958790 537695 -669793 880992 111491 -870670 422264 951064 -785276 -730616 -636754 -304242 -70145 -192541 268744 86134 -615222 -532966 299297 47626 -959518 220972 -313981 -887350 479102 305181 444399 941036 473492 952670 -424727 67166 -821580 -729626 -709116 808643 941368 -971197 834275 369644 78725 -266310 -826326 860300 -139931 -135714 522878 -155734 -3660 585343 506818 -224941 -435566 334546 -188502 -218275 -140905 926630 562743 621282 736053 366507 -718130 -675414 -923782 535533 -147618 701815 837894 -51664 -753402 125137 -647295 -127609 -364700 263591 850473 -352003 -865568 779336 -580481 -60732 -876873 393772 281847 -664536 947873 -595301 -561326 735085 -504506 -144939 211016 -728989 867028 -153304 311052 -538764 -356291 710550 -15136 378377 -296512 -390234 771972 -596795 522350 -915533 146312 -556404 -579446 882208 -148491 471253 863610 629903 -130572 -293013 441812 230271 -993866 -563483 -335611 -887634 -713390 -475986 -708447 341235 -340645 -433299 -154402 70138 522956 -940111 577396 209393 91911 -536250 -244648 -2586 872931 946635 -933792 958283 204676 93576 -274958 -574067 178232 989068 -514211 -144238 -633790 237967 157066 245297 -551161 -202629 12323 -742189 153653 -707481 -455362 397800 -246350 429619 -229353 -319944 -835945 -365227 -511946 146886 818916 -272807 -700279 -294057 -295652 47194 -116980 -416681 -994173 763433 -263437 -213248 233476 -166085 -791145 963164 -883562 838831 986610 476143 -707210 -294458 -806293 -699684 -911950 89051 841470 909792 777079 -522450 836626 -553301 -772775 -474751
Output: 140

Example 3:

Input: 201 -982893 160170 802886 451041 -121248 -379849 829443 -812857 617229 -194740 132685 397978 -198500 -890649 -397263 -467831 866820 -121872 -32789 -217362 -799633 757292 -827978 -696150 -392246 993666 428222 -218204 -700940 -108568 229815 380407 -360419 -64893 258833 716806 -504371 -542074 -472392 120447 417441 -187099 430401 467275 -915697 963062 -482912 332662 211723 -991531 -327301 -386917 811334 320252 686068 -718870 -811141 482401 842500 -695554 -24798 736975 694845 -509329 167111 -819152 -705228 -999982 -636189 -581639 584168 653507 108639 798733 914559 679684 -123999 119827 -40916 -770654 -255149 -791168 -122726 -991124 -196966 -230812 -604697 -143761 -673726 -696616 -220612 -213402 941531 283879 494686 727468 -467273 676977 476631 483584 -551608 906781 568506 -198226 360459 134768 -153109 -93429 -473206 -310128 453055 168007 -41742 -762992 -245622 857802 -613167 -482368 756419 -441979 -575792 -574211 660402 -186546 883057 901422 -680894 -97411 -683965 960680 876263 585161 623887 641671 862012 715265 -219503 -586969 968362 510141 -343904 711979 823143 -135427 162381 -772560 -398565 41574 383135 -539331 900686 988413 -911413 -317478 -524338 -409873 48015 352742 -876803 -64725 -489794 525068 -712680 -391607 33031 -961660 154042 448797 692967 901605 -51517 99788 -101431 31461 910928 -131376 313530 -333211 -659544 -109343 -964007 527310 -824192 -21382 444888 556615 -543520 665851 -772409 -84755 367343 -541979 591429 231637 462297 652246 559081 -41500 -885016 495699 294020
Output: 95

Constraints:

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

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