Problems
Array SumEasy
Sign in to solve

Array Sum

EasyArrays33% acceptance

Given an array of integers, calculate the sum of all elements in the array.

Input Format: The first line contains a single integer n, the number of elements in the array. The second line contains n space-separated integers, the elements of the array.

Output Format: The sum of all elements in the array.

Hints

ArraysSummationAlgorithm
Sign in to run code
Run your code to see test results here.

Array Sum

EasyArrays33% acceptance

Given an array of integers, calculate the sum of all elements in the array.

Input Format: The first line contains a single integer n, the number of elements in the array. The second line contains n space-separated integers, the elements of the array.

Output Format: The sum of all elements in the array.

Hints

ArraysSummationAlgorithm