100 atcoder#ABC171B. [ABC171B] Mix Juice
[ABC171B] Mix Juice
Score : points
Problem Statement
A shop sells kinds of fruits, Fruit , at prices of yen per item, respectively. (Yen is the currency of Japan.)
Here, we will choose kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print an integer representing the minimum possible total price of fruits.
5 3
50 100 80 120 80
210
This shop sells Fruit , , , , and for yen, yen, yen, yen, and yen, respectively.
The minimum total price for three kinds of fruits is yen when choosing Fruit , , and .
1 1
1000
1000