Problems

Array Sum

EasyArrays67% 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
Array Sum | CodeForge AI