CT26078

The lanterns at Gearford

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

At the clockwork quarter of Gearford, Nils records each lanterns 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 <= 267; 0 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 77 378641520 537122600 436283305 889415046 409915518 79847989 690020804 532907379 155838462 238607870 566337757 968959131 774533636 211810518 722343637 843846488 471274303 250556533 698915095 980942131 604823744 148569670 399915736 872217794 468622777 72477430 321947393 813787013 961556765 441030041 167489904 433806377 516773240 562491591 184915044 272887835 600204632 158791137 833915890 440399861 77796283 720081851 899167373 283199839 4922261 233207862 962190842 822506249 973057064 333616383 607575420 650328219 746917868 592412973 867603242 9358159 826044396 285912099 534722563 56185108 643795257 298091602 456889035 752175453 295097175 728841887 545766340 341152203 886653808 328501169 732950918 564231192 439249180 714376383 643055858 77845596 631871910
Output: 39682094616

Example 2:

Input: 25 1657192 483938835 941359684 230605374 766628655 685745065 993896049 443586976 187570953 989223549 291371003 288033993 919402225 72206522 825813688 18984193 340722260 201464105 779623070 151643475 314002017 526327514 730321415 857811551 940570484
Output: 12982509847

Example 3:

Input: 148 954947492 783748550 704341639 459834704 9464295 157887686 752258415 405065069 168829949 549303023 495230918 165378308 46473364 835519953 68793998 145400766 248649872 943528126 404727720 34499217 373849502 632566553 425081437 257153702 166274218 908507326 402645539 129238985 712190660 591565794 396085793 381376811 445826887 940890874 708160223 938917349 52260593 543682440 159991046 694324892 841400244 866575038 1209060 776556233 963092367 137035035 939306758 294261725 925714723 274805326 902101298 188956414 23909012 723909599 517259742 69219256 489213575 388006104 911359734 546776033 594521530 24292306 142310218 437463114 970651686 319770521 505204023 317455889 677394246 959011752 575589234 829212261 916491575 991209448 876171006 111431500 279453800 656202990 972784479 649371859 497028877 729282090 224606143 292498219 866317973 333846942 869193169 524722737 791719580 639280192 161179559 767971095 793401712 818693763 120735046 254126514 655341484 443310107 22227820 235007879 147431282 871905235 182103585 473720822 455021084 956092541 832713890 397415525 852972646 327166916 792537118 383385107 997746203 835554422 421709036 189075 609679390 389581090 976009601 813879937 654309359 674727504 813587666 203540119 65370270 430039978 505632136 152742050 966623259 184561238 157577679 395700268 362200077 274160694 771031066 726485272 743268527 263050782 933403131 647241939 229031474 802042710 507964595 535439145 20192351 854386150 837957681 661773674
Output: 76912480601

Constraints:

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

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