Functions
Function-46
Function-47
Function-48
~/algor $ cat problems/funksiya-massiv-yigindisi
Sum of an array
Easy
1000 ms
128 MB
32%
Write a function ArraySum(a) that returns the sum of the elements of the integer array $a$.
Example 1: ArraySum([3, 1, 4]) → 8
Example 2: ArraySum([5, -2, 7, -1]) → 9
Write only the function body.
Input
One line with the array elements $a_{1}, a_{2}, \ldots, a_{n}$ — the argument of the function.
Output
The value returned by the function: an integer.
Note
$1 \le n \le 10^{5}$
$-10^{9} \le a_{i} \le 10^{9}$
Examples
Input #1
3 1 4
Output #1
8
Input #2
5 -2 7 -1
Output #2
9