CT26828

Timeworn tickets Sum

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

At the zephyr cliffs of Galeholm, Wade records each tickets in a worn leather ledger. The guild wants answers, not guesses. Task: Read n integers and print their total sum. Input format: First line: n. Second line: n space-separated integers. Output format: Print the sum of all n values. Constraints: 1 <= n <= 951; 0 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 297 867200509 320736233 853050823 20699713 584086411 534998262 488303582 638770194 312904335 858056100 790102872 533920598 687289460 297242355 406054035 235387572 280336850 407012556 397948376 155736335 33955900 767929967 402329137 922728857 676805984 712831489 761501309 649030420 77092970 649373749 884984113 293337829 458367251 970390111 840486222 395124798 433321276 634986900 52040087 447067853 160932656 681945689 323283978 113165112 640124003 749623627 335026512 856879269 526804485 20176134 567372171 856127796 619471469 971714890 661660410 289267548 120007864 399844500 493581958 368892510 235145582 312869821 250773457 340226082 355813265 886526555 258286123 40003080 321449023 427694548 783792217 286805691 327152659 154020273 826138382 244988084 367503345 909760097 225001655 649334738 76…
Output: 144248853299

Example 2:

Input: 147 505619474 154659061 738955469 525716721 971198259 300471359 247598543 734087211 234050348 114967998 61560808 119122587 688900589 647239028 29273199 901242872 111380493 426247819 576305614 768273587 42415158 923373298 796405886 370979640 677994330 290695219 728936939 662954687 267036930 58964437 984850542 654022087 872256866 868320796 221298391 329709727 600470863 967047203 504066189 860533216 476581164 488126020 572802004 583413731 728598922 188567665 201627655 564126763 698890418 444516250 567062652 639005066 260298137 398336569 165983577 58942896 883520791 540328844 655010040 746784988 924671181 490719529 209310045 48632885 895776451 418451364 434043303 466774658 407052632 567251775 165498669 203352863 220600600 747551033 315872550 470046145 28217169 747222979 343733961 773390140 198…
Output: 72420213540

Example 3:

Input: 603 200004452 183646217 155151761 543887928 460189752 373920442 461271626 35476071 558719530 541949414 205591621 69655193 456822810 904929474 685901847 999884282 348923863 614820060 347236774 933720164 607958986 310434643 465434257 620034233 529294288 399741271 460982706 571194548 771332872 48949014 403880763 982441455 253209036 298805059 938907622 679102833 462758170 224793010 637853248 695026134 165945251 857677770 367425718 249753539 585036603 983609890 95384342 429561892 622688983 745449511 44884651 435772611 293485958 483120696 832963437 244507877 893044799 831529208 389618651 307463768 757818880 723493209 495610826 20043097 63194831 169099911 266621892 569632884 397747941 213764639 931089408 786643964 302096924 221331390 701709241 16068062 346565905 237652630 201403288 29257655 62725…
Output: 300336741281

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.