CT933

Urmila's Ledger of scrolls

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The harbor bell rings at the orchid house of Bloomglass; Urmila weighs the day's scrolls manifests and starts the calculations. 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 <= 100; 0 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 1 499567
Output: 0

Example 2:

Input: 43 417725 952437 762992 385290 694542 80396 15569 22340 104785 34834 372469 15966 573402 18440 757886 334898 434961 958194 663048 554315 400213 608457 619050 857153 131616 106000 227222 854274 600680 112887 621025 397481 250810 307421 970294 456302 326985 436943 105344 66527 498079 889419 784135
Output: 9623820

Example 3:

Input: 94 388322 308244 785321 971218 316785 8270 305304 948099 762022 836210 895589 394987 931879 780159 148548 970695 271698 336559 551135 768268 519919 872380 878737 59083 63427 18155 804071 708076 160923 263893 352388 258086 387318 332122 291522 210637 218058 519547 812889 585695 900103 697847 421660 992558 499203 200263 255011 832939 762710 570452 799688 985302 559554 816749 186640 172536 643173 701514 253244 511018 38867 728352 665070 112959 842722 439472 164912 992400 162881 804295 229551 423865 92137 214641 775340 68160 355471 191703 909405 792891 266387 210748 91197 200373 649347 163442 622232 125189 672063 753121 384654 754284 519402 343266
Output: 22779386

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Urmila's Ledger of scrolls - EASY Coding Problem | CodeTikki