63. Total Runs in an Innings

Acceptance — 0 accepted 0 submissions

Easy
Arrays
No companies listed
The scorer at your gully cricket match wrote down the runs scored on every ball. At the end of the innings, everyone wants the total score.

Given the runs on each ball, print the total.

Input Format
The first line has n, the number of balls.
The second line has n integers, the runs on each ball.

Output Format
Print the total runs.

Constraints
• 1 ≤ n ≤ 1000
• 0 ≤ runs on a ball ≤ 6

Example 1

Input
6
1 4 0 6 2 1
Output
14

Explanation 1 + 4 + 0 + 6 + 2 + 1 = 14 runs in the over.

Example 2

Input
3
0 0 0
Output
0

Explanation Three dot balls, so the total is 0.

Example 3

Input
1
6
Output
6

Explanation A single ball hit for six.

Acceptance —
Accepted 0
Submissions 0
Auto-save
Saved Ln 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
14
No results yet
Run your code to test it against the sample cases.
Problem List