Nội dung Bài tập
- Mã:
- ABC171.BaiB
- Tên:
- ABC171.BaiB
- Dạng thi:
- oi
- Thang điểm:
- 100 điểm
- Giới hạn thời gian:
- 1 giây
- Giới hạn bộ nhớ:
- 256 MB
- Được tạo bởi:
- admin
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.
Sample Input 1 Copy
Copy
5 3 50 100 80 120 80
Sample Output 1 Copy
Copy
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 .
Sample Input 2 Copy
Copy
1 1 1000
Sample Output 2 Copy
Copy
1000
Theme :
Mời bạn soạn code
Ai có thể xem bài này :
Thông tin
Phần thảo luận