CT27675

The Faded Sum

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The harbor bell rings at the ivy courts of Vineward; Ranger weighs the day's coins manifests and starts the calculations. 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 <= 259; -1000000 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 128 774091 -819155 815306 -513690 993413 -67002 -300510 670306 -779225 -541641 628886 -710784 956632 298773 522245 835467 788992 513494 680501 544270 -128195 644095 443218 194714 205264 631932 -918399 -187222 -112898 -134872 101684 -934832 -846103 706276 -103333 226649 888724 35701 -265566 -51243 -494796 949864 -792945 984116 -764777 606890 548436 512147 760038 696905 -239379 263484 -206503 491837 721413 -997876 -21088 134003 136511 618679 -563164 925732 843025 53429 -378628 -455605 276034 -446400 -518325 -840703 -546631 -768138 -770524 -894805 415019 851947 806529 -292611 -894997 -516633 -574591 -731318 556655 -642830 -298139 757753 -636538 293270 -773960 125489 447491 -757444 -606161 465822 -58107 88931 -622713 317270 -899372 -973213 330281 447346 618519 131881 -879549 -118101 -931483 -81960 -678547 640171 -516382 -402160 -927145 -487204 825078 -588060 -181652 413645 906490 729340 39705 -163324 729830 -421160 149686 205187 -687110 265258
Output: 724348

Example 2:

Input: 239 626590 -717936 831025 101355 -695818 822202 200570 -879802 852592 -112762 -328528 -300293 -731359 -745626 -710971 -797006 197755 175916 -361276 523602 347394 58104 849096 736153 793038 -211086 -225648 973703 615568 930378 -399072 260304 385864 -278919 -247607 -381078 176329 -19640 -472260 -861136 -538086 -841831 219494 -611817 640874 -734115 795751 -236961 -722802 494534 -875167 508447 611008 101805 759748 -771526 -464260 874426 -534841 -942841 -619453 -973328 515184 -487275 -471185 23748 -444243 -26303 -447975 -330566 -889085 -269048 -309112 148296 428174 -637423 912553 580909 677316 742355 -65874 -149186 190952 -629067 -683357 849930 -854416 376553 300129 -576348 -368133 683972 887732 375269 -184586 435554 -364846 -872486 655295 -658786 455425 355674 643639 -65195 384674 -625581 -318599 -222847 -344396 -837967 779072 155194 -692445 550403 -963657 284002 -413463 -508200 -509659 -136273 512035 954694 -668849 -622696 -64312 -298546 82935 -266319 413864 -642451 754879 432887 286161 -419231 707674 -151978 403117 -702245 -897175 -446483 -374339 126963 657694 -407134 -609447 772243 -102521 688691 669512 491157 -803292 -218255 -827901 -783746 578828 378096 813532 249363 -600995 979892 484778 600327 -204476 246671 -419335 -484014 834376 -247642 874519 394213 -215231 205988 -86969 103190 481651 -773746 -28796 -480265 80667 619235 785746 -111612 -94173 -265247 36124 109735 30738 799459 -51124 -852723 352366 69938 51498 351190 797623 568732 388762 427465 659256 419632 471652 995076 -41996 -487962 -233713 -320029 763048 -228433 628470 -778943 748630 156318 -416391 -561069 -419236 505909 -857153 -726444 6523 -352463 -683964 -781863 918746 -285521 -995864 -909400 629425 -485684 3088 431040 -974954 206857 -243653 -820446 -443831 -520337 771958 -374734 738050
Output: -3311269

Example 3:

Input: 33 -354572 329805 592447 739477 -994527 -727358 -701911 -347069 -645663 -404319 507713 546206 969876 648034 133611 538656 124348 -303330 -498453 248402 -278068 351866 -127410 373513 71309 666852 -24206 -512673 850973 113459 -905794 86763 376637
Output: 1444594

Constraints:

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

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