CT994

Nyssa's Beryl readings

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Nyssa inherited the kitchen at the temple city of Sunspire along with its curious bookkeeping system for readings. Time to make sense of it. 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 <= 30; 0 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 18 10 3 0 9 1 3 3 3 10 8 1 10 5 4 3 4 7 8
Output: 92

Example 2:

Input: 16 10 3 4 4 6 1 0 3 9 8 5 10 3 5 10 4
Output: 85

Example 3:

Input: 8 4 3 10 2 10 7 4 10
Output: 50

Constraints:

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

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