Array Sum
Practice
3.5 (274 votes)
Problem
69% Success 78225 Attempts 10 Points 1s Time Limit 256MB Memory 1024 KB Max Code
You are given an array A consisting of N integers.
Task
Print the sum of the elements in the array.
Note: Some of the integers may be quite large.
Input Format
- The first line contains a single integer N denoting the size of the array.
- The next line contains space-separated integers denoting the elements of the array.
Output format
Print a single value representing the sum of the elements in the array.
Constraints
1<=N<=10
0<=a[i]<=10^10
Sample Input
5 1000000001 1000000002 1000000003 1000000004 1000000005
Sample Output
5000000015
Code Editor
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Submissions
Please login to view your submissions
Similar Problems
Points:10
89 votes
Tags:
ImplementationBasic Programming
Points:10
185 votes
Tags:
Ad-HocApprovedBasic ProgrammingEasyImplementationOpen
Points:10
20 votes
Tags:
Basic ProgrammingC++
Editorial
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor