Christmas Lottery
Time limit2sMemory limit1024 MB
For each receipt, count the full A-ruble parts of its amount, then print the total of those counts across all n receipts.
- Level
Easy1 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Statement
Christmas is almost here, but the shelves at AKEI stores are still empty. To draw in shoppers, sales manager Anton came up with a promotion. For every rubles a customer spends, they receive one lottery ticket, or, as the ads put it, a chance to win a car.
However, not every cashier knew about the promotion, so some customers did not get the tickets they were owed. Now Anton receives a stack of receipts every day that need tickets. He has not slept for three nights and is exhausted.
Help him find how many tickets he must issue.
Input
The first line contains two integers and (, ): the number of receipts and the amount in rubles needed for one ticket. The second line contains integers, the total purchase amount on each receipt (). All prices are in rubles.
Output
Print the total number of tickets Anton must issue.