#K3541. Max Sum After Operations
Max Sum After Operations
Max Sum After Operations
You are given an array of integers and a number of allowed operations. Your task is to determine the maximum possible sum of the array after performing these operations. For each test case, you are provided two integers: \( n \) (the number of elements in the array) and \( k \) (the number of allowed operations), followed by \( n \) integers representing the array elements.
Note that, according to the problem, regardless of the number of allowed operations \( k \), the optimal strategy is to simply take the sum of the array's elements. All mathematical notations, such as \( n \) and \( k \), are shown in \(\LaTeX\) format.
inputFormat
The first line contains an integer \( t \) representing the number of test cases. For each test case:
- The first line contains two space-separated integers \( n \) and \( k \) where \( n \) is the number of elements in the array and \( k \) is the number of allowed operations.
- The second line contains \( n \) space-separated integers denoting the array elements.
outputFormat
For each test case, output a single integer on a new line, which is the maximum possible sum of the array after performing the allowed operations.
## sample3
5 2
1 2 3 4 5
4 1
10 20 30 40
3 2
5 5 5
15
100
15
</p>