CT23189

Zephyr's ingots Reckoning

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Deep in the honey farms of Buzzwell, Zephyr studies rows of ingots entries. One clean number will settle the guild's oldest argument. Task: Read n integers and print the sum of all even values. Input format: First line: n. Second line: n space-separated integers. Output format: Print the sum of even values (0 if none). Constraints: 1 <= n <= 509; -100 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 394 25919 214896 738885 74800 727401 133760 686057 568913 8205 770871 523286 72689 199495 785074 963738 592357 255991 920253 245098 944168 793195 770540 903418 469859 144813 868958 656175 465249 114823 379138 397102 207110 503912 62834 172300 540221 755164 327715 687062 651174 648412 475283 663354 959285 715696 894787 714759 169511 563686 734290 167205 732519 237661 510487 517572 682985 924571 767153 289695 8383 960995 101184 986285 71137 868832 379213 152789 226515 31733 293559 713518 603778 20923 142972 397533 568199 313812 959847 537048 434730 713158 304070 186640 882322 616367 630387 594037 530151 39175 16913 911720 778713 716458 561726 704238 968117 807495 296690 86545 194535 423181 446299 263742 205937 393182 522687 158512 462734 304636 559272 634120 360259 692286 173789 285364 81467…
Output: 96648944

Example 2:

Input: 190 781024 744285 270491 666747 272569 631448 686398 599368 514021 621803 135058 329641 654143 972708 926986 8442 499229 661936 443003 793787 435964 748042 980119 125735 777079 277639 269551 213281 524697 206953 674613 495706 145043 602812 846885 86771 421679 406340 278152 801260 530584 572141 905275 876905 483643 857699 404318 88387 768726 232835 806306 347262 271757 553119 331265 703592 108269 543035 707987 406868 958638 268624 678011 502490 968968 621968 115456 432127 384910 309909 959026 491055 820355 992278 345723 162258 781804 922789 538106 879777 774780 830857 100619 404308 931664 372165 219984 127604 643271 274723 486001 115655 854469 489842 888585 920399 48598 726527 933190 510926 956375 519111 753967 461461 749286 473169 491700 846042 624967 435215 531046 378991 732886 427310 761…
Output: 49041378

Example 3:

Input: 475 41800 9805 949621 718361 853513 846141 323881 891616 760200 230588 243920 471739 813220 740440 120449 719289 375653 118673 118256 859200 565290 863768 514737 220670 803635 259118 521838 105731 433284 993005 419480 493425 131731 132116 893001 480359 279694 436969 76652 196785 647294 752219 756345 413790 722335 659561 570024 262927 315561 637799 132461 916393 220708 102377 289505 892778 187178 276303 570086 318305 112376 888951 626005 696797 485168 712933 498615 614141 828704 635589 395380 720704 876266 360310 239376 914348 564725 26257 849992 880860 458921 923291 468381 225615 389662 828589 142241 152884 692770 77789 590175 162792 803577 826626 444497 304961 35749 241087 772770 948364 869023 297157 121334 429990 822797 334817 755666 388466 22426 958510 59266 386919 443193 563380 951214 …
Output: 114458362

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Zephyr's ingots Reckoning - EASY Coding Problem | CodeTikki