#C11138. Maximum Sum of Array B
Maximum Sum of Array B
Maximum Sum of Array B
You are given an integer N and a list of N integers, A. In this problem, you want to obtain the maximum possible sum of another array B by performing a sequence of operations on A optimally.
Upon closer inspection, you will notice that no matter what operations are performed, the maximum sum achievable in array B is simply the sum of all elements in A.
Your task is to compute this maximum sum.
Note: The input is provided in two parts, where the first line contains the integer N and the second line contains N space-separated integers representing the list A.
Mathematical formulation:
\[ \text{Answer} = \sum_{i=1}^{N} A_i \]
inputFormat
The first line contains a single integer N (1 ≤ N ≤ 105), representing the number of elements in the array.
The second line contains N space-separated integers, the elements of the array A.
It is guaranteed that each element of A will be an integer in the range [-109, 109].
outputFormat
Output a single integer which is the maximum possible sum of array B, i.e., the sum of the elements of A.
## sample5
1 2 3 4 5
15
</p>