AT_past202306_e 合計得点
Description
In a certain programming contest, $ N $ problems are set, and if you answer the $ i $ -th problem correctly, you are given $ A_i $ points.
Consider choosing and solving exactly $ K $ problems out of these $ N $ problems.
When you calculate the "total score obtained when all the selected problems are solved" for all ways of choosing problems, what is the sum of those total scores?
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ K $ $ A_1 $ $ A_2 $ $ \dots $ $ A_N $
Output Format
Print the answer as an integer.
Explanation/Hint
### Sample Explanation 1
In this contest, $ 4 $ problems are set, and we consider solving $ 2 $ of them. There are $ 6 $ ways to choose the problems as follows.
- Solve the $ 1 $ -st and $ 2 $ -nd problems. The total score obtained is $ 300 $ points.
- Solve the $ 1 $ -st and $ 3 $ -rd problems. The total score obtained is $ 400 $ points.
- Solve the $ 1 $ -st and $ 4 $ -th problems. The total score obtained is $ 500 $ points.
- Solve the $ 2 $ -nd and $ 3 $ -rd problems. The total score obtained is $ 500 $ points.
- Solve the $ 2 $ -nd and $ 4 $ -th problems. The total score obtained is $ 600 $ points.
- Solve the $ 3 $ -rd and $ 4 $ -th problems. The total score obtained is $ 700 $ points.
The sum of these total scores is $ 3000 $ points.
### Constraints
- All input values are integers.
- $ 1 \le K \le N \le 8 $
- $ 1 \le A_i \le 2718 $