#abc281e. [abc281_e]Least Elements
[abc281_e]Least Elements
Problem Statement
You are given an integer sequence of length , and integers and .
For each , solve the following independent problem.
Find the sum of the first values in the sorted list of the integers in ascending order.
Constraints
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
Let be the answer to the problem for , and print them in the following format:
Sample Input 1
6 4 3
3 1 4 1 5 9
Sample Output 1
5 6 10
- For , sorting in ascending order yields , where the sum of the first three values is .
- For , sorting in ascending order yields , where the sum of the first three values is .
- For , sorting in ascending order yields , where the sum of the first three values is .
Sample Input 2
10 6 3
12 2 17 11 19 8 4 3 6 20
Sample Output 2
21 14 15 13 13