CT25353

Harish's tickets Reckoning

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Every season at the granite steps of Stonehallow, someone must compute the guild dues owed. This year the task falls to Harish, armed only with the tickets register. 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 <= 528; -100 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 512 237627912 956387132 575922648 363253979 554927507 589751780 636623077 810061689 791263742 481234661 506958263 67334937 226497154 546489798 29068184 708896454 775497555 375247680 95986015 647381244 450637705 332002391 152427584 103162443 620812717 902264622 368120695 726316848 812023419 770482901 674416561 36889701 852368303 275928380 977222040 531326464 8231192 563135380 378354091 874468062 819423109 590617212 745610819 560014783 72613651 923610233 692142567 308283134 284877107 126526462 608207297 999873918 565581410 173751184 469387415 320876696 352045109 538117214 472631423 853948154 43394955 704939432 248485574 594847026 906406202 705304771 877624016 801476560 115664937 672558916 773867689 874972438 350632637 930220823 356215720 146149425 627955684 287888254 174828550 142673525 3591…
Output: 252417123805

Example 2:

Input: 344 644361172 343751303 450616862 50162043 74594323 687363386 763847258 645709696 36144443 511663343 333843002 791039526 703544800 667560313 841518434 189379820 583564969 191308203 936821529 699590574 627882393 504866924 665042630 982990970 578733372 741949052 626516102 118956098 525039453 621694425 392240139 779986684 3870968 998951298 322588868 875712238 238020525 532292555 796652094 871911235 695188629 677960927 857668597 508947104 671059227 105369451 983699011 236449580 110978380 407296767 876616253 368189910 168990009 494160836 644305054 646239315 297116163 823903923 176020856 226561883 650024423 685371906 732793951 851800098 643137664 265038716 590448940 933722325 805827415 128894745 460999415 736873034 662567393 316640863 659746532 391743531 891632349 966364315 841662625 228857365 6…
Output: 175676910926

Example 3:

Input: 319 245173703 400398195 977632510 460466353 409849980 523677498 876513910 783996968 871300495 474324727 26343644 608868029 287283755 501778664 711891927 723936377 549496624 340612343 654450523 219374857 401794107 298365312 421020165 820152490 299429863 243824807 468314678 212210600 22937295 504302559 325471732 733752012 877922695 879007320 125686469 60122147 524301844 896996308 537494936 87674308 950944475 5614597 806908545 959736073 383529285 341797257 923388887 777287221 377346146 601372477 807699392 563236768 287919818 163980473 557150924 398047091 626861419 480912555 215719703 683820519 737179071 916360076 357880661 293947452 80276781 848824122 616105720 758403360 206682694 802714029 837866749 367599792 298859305 946646238 297623479 645893758 236558742 805779800 239925295 393322097 355…
Output: 159409064647

Constraints:

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

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