CT23632

The crates Even Values Sum Puzzle

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Before the gates of the salt flats of Palemere close for winter, Cleo must finish the crates ledger - one figure at a time. 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 <= 545; -1000000 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 109 178253172 726516349 736601787 213950576 505131420 403163493 556321479 432237024 81295106 221376554 284824135 857273525 853069712 592062570 160166713 207836292 336876265 628603054 695083370 146556963 960622514 931727242 465142739 913535760 394812989 848135107 942496651 220961374 881095853 205350681 197744302 70399355 101539562 269574512 257060378 116776148 434814428 103757519 577711400 718070236 809673028 362230324 255363048 248546855 553107684 571807377 458178514 667082849 903778126 360812405 527742617 479572869 910422003 280505572 959785904 507652541 936770947 288564130 60587325 989316476 164213677 369536734 567151504 151210693 768367632 877126513 636196589 549736774 621192402 447329809 739269102 72521772 98342394 42190969 743187808 28806869 242110003 481180281 375789470 361364450 935…
Output: 27897685518

Example 2:

Input: 398 227519425 31552678 255090209 655681166 961998987 388577924 666224247 815139354 545166413 580703808 132407788 67207259 709274721 228253838 489420376 165157752 691281637 937490308 795010484 101932600 167243593 539218744 220682189 145760856 703445716 507479245 655610864 449733985 177239980 632140124 911650074 872577452 835931099 434850789 993800482 288794093 838720868 41846879 537722604 937560396 723137483 381162618 895999778 916645863 292476665 497778713 578926416 24153716 235168756 230862744 345387986 268546484 538650226 352947656 933036814 985862924 176896310 275475310 250122189 916193051 452475985 950221851 993854618 79893589 456158997 193516324 549188057 132476908 574310466 182665733 883078812 93825432 266618940 304162989 495404649 483280417 131834747 243815105 781267195 232926836 23…
Output: 109820392388

Example 3:

Input: 187 847149320 947010058 510206715 955007523 718717405 537665497 398023666 515331621 348753744 648428523 143519649 2532618 748296822 384497286 349729240 57012074 566855915 36441752 358145765 937116482 682443932 799599512 634253997 833260917 174974129 632188786 982223952 838691527 876272582 428771886 302177293 554247772 88234915 148546600 398971798 86865443 716493290 909060302 238016376 257535598 629056311 617460223 958667408 809196417 369708490 590414826 15016234 958800955 664687972 482575641 104750013 944801530 522400392 594582914 297732475 999058524 913930137 190334675 232650467 845672861 339866679 301586089 346409711 102101857 702086605 964241523 655430933 889344425 167658348 916794957 85643852 714019100 969383083 827682767 697059266 491559484 578357300 318237567 739880531 535049168 9485…
Output: 49190260406

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The crates Even Values Sum Puzzle - EASY Coding Problem | CodeTikki