Voucher 3
Xem dạng PDF
Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
On Singles day, Hoa has M voucher which gives 30% discount (maximum 50 thousands VND) for a item. The discount will apply to one item only and doesn't apply to whole bill. Hoa willing to buy N items at the store. How much does she need to pay?
Input
Two integer N and M (1 ≤ N, M ≤ 10^5) which is the number of items Hoa wants to buy and number of vouchers she have.
The second line contains N integers which are prices of N items, correspondingly. The prices is not exceed 10^9.
Output
The amount of money Hoa need to spend on items.
Example
Input
5 2
100000 5000 2000 100000 200000
Output
327000
Bình luận