CT1492

The Sum of the Marble stamps

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

In the pearl fisheries of Nacre Bay, Elowen the tallyman keeps careful count of the stamps. file the annual report, every figure matters. 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 <= 58; -100 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 1 -29
Output: -29

Example 2:

Input: 35 41 349 489 430 873 869 696 -70 781 710 -12 526 369 876 87 413 733 713 934 699 733 629 851 771 786 109 214 95 608 -69 1 848 482 151 959
Output: 17674

Example 3:

Input: 7 617 178 917 658 288 505 771
Output: 3934

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Sum of the Marble stamps - EASY Coding Problem | CodeTikki