CT2121

The lanterns Sum Puzzle

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The assayer Wren has been asked to restore an old family record. On the desk lies a long table of lanterns readings. 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 <= 44; 0 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 27 5 9 9 9 4 0 3 0 8 9 9 2 10 1 0 8 5 7 3 4 6 10 8 9 0 1 3
Output: 142

Example 2:

Input: 2 4 4
Output: 8

Example 3:

Input: 27 9 0 10 2 9 7 5 9 6 3 3 4 6 2 10 2 2 5 10 2 3 0 2 1 8 0 5
Output: 125

Constraints:

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

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