CT22254

Bhanu's Azure ingots

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Deep in the opal reefs of Shimmerdeep, Bhanu 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 <= 244; 0 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 241 33413 484079 642569 129920 482953 847923 257167 888534 60077 206135 373855 820897 940927 826308 849140 710475 379618 52011 776385 988614 323648 589527 570834 850447 45094 405073 433956 230924 76789 402134 10995 394615 476637 328706 680304 302024 925498 617509 283639 119930 177331 712556 167913 928515 856921 58825 646991 119712 350621 760095 164964 848451 803845 298375 238766 11538 114294 599745 168791 181616 441716 231087 382061 483996 464920 249476 141473 924328 750131 31104 900921 605289 149748 62682 263676 424804 902111 977456 819084 313750 231707 195966 645978 511136 826756 610031 749647 889104 529038 6323 114180 484121 69811 445364 548283 641209 552851 634380 770430 504916 287047 513583 464957 425689 988889 867422 572248 617535 405284 611331 651527 30747 595190 735288 518110 61083…
Output: 55976986

Example 2:

Input: 163 413798 143507 328863 387732 538969 214491 288741 200067 810704 326093 213241 695513 893702 939742 127797 283057 848252 164274 577638 413184 571042 625956 114418 186133 698210 29059 328615 628306 411483 40905 148656 785388 753698 679468 54469 761750 760836 308208 180087 863399 638734 105785 558736 224073 420530 445067 800428 755976 164738 959986 76646 776152 575381 453472 193882 414998 126430 360931 617835 945491 766119 838295 410172 866068 59052 349247 136196 468253 460534 874551 329334 978938 107950 235504 842779 885273 927374 720052 609522 325090 911464 120581 837788 226390 612516 606811 331490 80791 113846 423614 946264 998811 547598 244439 559272 512482 600379 242758 88523 128069 255320 450881 914670 82355 922602 468208 496705 490544 531343 370303 17790 15222 731070 188956 284607 5…
Output: 48978248

Example 3:

Input: 233 749011 299325 301893 956800 119551 335642 620611 20602 170959 576671 283004 490041 949157 574104 879586 700659 577470 85764 301311 391506 320940 346617 612983 789810 42401 738652 893687 845651 662477 449108 561077 881461 230807 120218 860831 95765 17743 742499 282569 378220 911918 79540 899102 439990 610114 365117 409813 803744 374528 241251 832416 869078 158003 821424 890811 398243 994036 301016 517284 871540 886151 339143 753911 243796 263594 5569 330841 858099 784799 945639 687437 168826 848860 797009 401705 788241 665418 482604 8450 406457 421599 99463 311980 311125 309256 892054 820788 259805 10263 146989 120618 982385 654670 464770 717745 318593 935664 927581 537120 873293 340468 683282 738250 77040 434151 554329 88407 6378 661549 850602 35487 653435 126160 336764 778571 829080 8…
Output: 60653902

Constraints:

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

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