CT26102

The Sable Sum

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Rhys runs the print shop at the railway depot of Cinderline. Today the books show a list of barrels, and the numbers must be worked out before sundown. 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 <= 388; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 193 329 58 524 845 227 159 13 549 247 122 340 486 162 39 507 582 914 245 96 551 349 803 960 481 741 365 771 916 411 277 361 821 183 928 522 964 295 906 410 276 691 804 351 712 955 771 76 64 899 651 750 707 787 799 204 728 829 800 517 131 816 431 570 15 660 667 814 848 240 483 709 846 838 90 551 659 409 239 37 632 609 335 82 19 178 97 646 737 193 999 318 987 10 503 130 523 74 286 339 645 825 285 469 20 979 301 665 685 914 480 148 894 584 878 605 58 821 815 828 749 799 632 903 916 356 943 452 284 616 231 176 581 732 816 816 885 228 373 558 922 28 997 959 842 448 752 65 748 967 753 674 225 612 759 526 429 944 152 166 402 467 971 597 984 947 672 927 394 33 866 226 238 679 175 801 489 257 818 694 49 82 409 805 177 381 779 838 782 607 428 861 597 134
Output: 103059

Example 2:

Input: 95 464 460 137 195 442 672 146 952 135 619 724 328 841 732 448 330 341 596 576 302 830 681 530 138 547 598 615 504 712 67 681 110 138 34 483 472 807 969 931 370 185 535 920 65 695 328 248 658 390 953 882 567 379 624 829 364 354 335 864 490 471 52 444 677 663 501 948 586 115 747 353 264 536 118 209 334 276 561 569 499 7 206 209 895 354 876 137 933 464 501 49 819 415 836 957
Output: 46903

Example 3:

Input: 384 375 751 315 483 618 66 597 166 310 274 163 613 921 910 502 866 489 206 805 777 534 974 775 897 286 481 531 16 629 242 468 949 709 186 493 801 782 679 385 201 653 66 942 929 854 475 323 440 767 260 504 917 849 484 82 987 712 274 292 367 742 921 662 419 332 453 382 812 869 18 477 609 821 1000 254 801 170 302 988 376 370 485 60 498 713 850 283 859 496 330 634 646 159 644 580 647 569 347 731 554 934 769 946 730 185 100 430 447 49 735 681 178 767 521 653 327 845 602 923 20 835 747 628 896 50 252 124 648 269 129 288 299 221 39 839 763 521 123 434 113 507 662 875 612 53 702 2 58 47 181 640 136 402 926 447 590 890 742 874 479 295 225 208 898 2 871 525 456 762 644 733 156 577 816 936 706 929 543 617 763 979 787 403 496 65 577 229 955 370 889 269 254 205 31 210 156 270 168 514 417 42 953 228 89 996 669 993 831 724 608 195 81 323 894 803 510 381 325 691 721 687 65 571 705 304 227 39 864 158 748 547 858 571 81 918 279 471 113 282 623 583 495 743 69 726 819 847 905 70 389 491 904 602 671 687 228 843 233 916 758 864 527 648 739 518 476 712 923 583 95 92 364 758 910 104 819 407 218 176 156 234 574 237 193 419 55 6 482 906 406 659 765 532 490 190 270 517 239 884 992 941 905 702 486 138 711 868 115 747 492 46 228 509 665 867 974 977 605 233 390 493 69 577 102 366 947 832 404 263 411 816 491 652 67 848 942 866 798 444 694 98 710 176 191 756 893 669 521 816 174 736 563 716 710 93 324 1 912 731 429 919 181 98 151 663 962 965 391 51 480 56 442 397 65 303 758 681 361 852 919 688 612 360 516
Output: 199113

Constraints:

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

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