CT29003

The Sum at Saffronia

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The scribe Trader has been asked to optimize the storeroom layout. On the desk lies a long table of stamps readings. 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 <= 714; -1000000 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 610 -660946 -364489 -592038 -431934 -19992 -236522 -947204 -719374 -323709 -747848 -663526 -604894 -283808 -771407 -230416 -733801 -956563 -272839 -884894 -130515 -950468 -30308 -480692 -628540 -362849 -162794 -684366 -466756 -375523 -818252 -164992 -972502 -680468 -700410 -166838 -743950 -719790 -451260 -886376 -991126 -392043 -782729 -65674 -650363 -474224 -59899 -149949 -305143 -164640 -529660 -687192 -78277 -809718 -522558 -306575 -728508 -297070 -658152 -443265 -568877 -717601 -20144 -391498 -582645 -267032 -669968 -75470 -527534 -94917 -945406 -467889 -109540 -699201 -694635 -581722 -776619 -13481 -89324 -448879 -592416 -888363 -114508 -983657 -808377 -128619 -131135 -80975 -993053 -92997 -325061 -683366 -177680 -844429 -625906 -6733 -116176 -345111 -159582 -893126 -515895 -146502 -1…
Output: -298102446

Example 2:

Input: 680 -210193 -554351 -917616 -543637 -340732 -227323 -786380 -404105 -443295 -368689 -963325 -432047 -409103 -73077 -978315 -476894 -486124 -32724 -954994 -581482 -803824 -225926 -134051 -513072 -385577 -400022 -890702 -700063 -631162 -820876 -927832 -578215 -239983 -339167 -619062 -949418 -797113 -405064 -16017 -332473 -696884 -369579 -934557 -145687 -766173 -84161 -548135 -914388 -708566 -231495 -289238 -319314 -998285 -102484 -497032 -245677 -835262 -204733 -465392 -792696 -691656 -651442 -845324 -645261 -454949 -36251 -302647 -811461 -633861 -902921 -549030 -655040 -85793 -412662 -94163 -675028 -405873 -728497 -832074 -788303 -321205 -679329 -58328 -594064 -809090 -459808 -385844 -529015 -658270 -568916 -570559 -710116 -802962 -105869 -867195 -143343 -553154 -477187 -227637 -748318 -349…
Output: -344547386

Example 3:

Input: 267 -897885 -551034 -320211 -946685 -584231 -930046 -637141 -230435 -572625 -512341 -985312 -477277 -514275 -4288 -25781 -627393 -483610 -491067 -796931 -477193 -7642 -629971 -100271 -937504 -563409 -928073 -402955 -194879 -204217 -857348 -854961 -266161 -297297 -266807 -567655 -316528 -283443 -169633 -627927 -692406 -184421 -381032 -32277 -5084 -646331 -332663 -247633 -725135 -114617 -765914 -446828 -830397 -494049 -57249 -860289 -577168 -588213 -170883 -938849 -307178 -246413 -853512 -569921 -963279 -618139 -300026 -189777 -793254 -80011 -175561 -555631 -516517 -392799 -696536 -149119 -964523 -618636 -524778 -265487 -147552 -110681 -923113 -464614 -400202 -319400 -357926 -383678 -586399 -917707 -448369 -514934 -972563 -93957 -510639 -918971 -700504 -589411 -78714 -783098 -135150 -773621 …
Output: -135285808

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Sum at Saffronia - EASY Coding Problem | CodeTikki