#C4139. Maximum Array Sum After Operations
Maximum Array Sum After Operations
Maximum Array Sum After Operations
You are given an array of n integers and an integer k. You are allowed to perform at most k operations on the array. However, note that in this problem an operation does not actually modify the array. That is, the maximum possible sum achievable by performing at most k operations is always the sum of the array elements.
Your task is to compute the sum of the array elements. Mathematically, if the array is \(a_1, a_2, \ldots, a_n\), you should output the value:
[ S = \sum_{i=1}^{n} a_i ]
Note: The parameter k is provided but does not affect the result.
inputFormat
The first line of input contains two integers n and k, where n is the number of elements in the array and k is the maximum number of operations allowed.
The second line contains n space-separated integers, representing the elements of the array.
outputFormat
Output a single integer representing the maximum sum of the array after performing at most k operations. Since the operations do not modify the array, this value is simply the sum of all elements in the array.
## sample5 2
1 2 3 4 5
15