CT25067

Rhea's Honeyed readings

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The council of the ink district of Scriptoria pays by the answer, and Rhea intends to earn it. First: the full register of readings. 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 <= 436; -100 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 21 144076019 767441686 269177355 446828487 378377086 666910787 833059285 775702072 132404275 654832232 54142462 988088028 291227354 952608462 560384985 51551969 835845530 807197930 862404129 24047868 536386159
Output: 6529510710

Example 2:

Input: 148 971128416 298926106 476471243 77936538 901867214 143978082 440143395 598773248 40468133 581144907 395344336 499697307 529219193 659415518 646883194 849347198 339822496 989270507 851258338 413886477 827903414 865873773 96656889 430666817 193026805 415259485 565945411 950380052 604213916 755017520 466712923 362526291 651581648 105796379 462594990 775038511 6074741 791703321 212242373 657728641 594760123 742782068 883489300 205842100 293829409 273293476 753596920 973673173 846212300 483743703 828225921 264483852 184519568 852003166 8600991 994352775 300385733 640072997 625145058 233143467 54148954 565140112 770159936 421868041 133923452 94190124 457664741 798963285 482351508 161420346 309155813 217656851 516422455 90246612 38347152 605059700 745912290 711486186 243170629 551239539 1979172…
Output: 38734100362

Example 3:

Input: 112 260929487 724132950 20248896 545892331 486251313 441337409 356575767 824213944 349038694 390667384 291175515 887549021 554030543 206370057 730180663 84499049 39993954 421695319 46628971 377845568 329859794 485140714 286397743 764498088 340986029 201617681 363221121 769053607 294655101 891618957 80979485 734385289 492604010 710908244 522337486 873832650 874904274 441544913 383953219 97323794 82340321 2214618 562312244 725360258 250190508 146426364 392530048 513998519 104040340 388254350 585401681 1800204 839078752 582143629 826266470 705990265 141840117 213327348 467433967 439090008 244750611 276222142 461517733 715738199 591316009 331124595 240982726 731044520 82359460 700757302 902334567 824516036 624772076 36003474 901224609 762608542 572309050 331026879 845557309 722818687 329500780…
Output: 24612069938

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Rhea's Honeyed readings - EASY Coding Problem | CodeTikki