Submit | All submissions | Best solutions | Back to list |
EIVCHR3 - Voucher 3 |
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 ≤105, ) 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 109.
Output
The amount of money Hoa need to spend on items.
Sample
Input |
Output |
5 2 100000 5000 2000 100000 200000 |
327000 |
Added by: | Ha Minh Ngoc |
Date: | 2020-11-17 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: GOSU |