The neighborhood bookstore makes attractive discounts to attract more customers. For each purchase made they give you a discount voucher for the next one. For example, if you buy a book that costs € 20 you receive a 2% discount voucher for your next purchase and if the book costs € 15 the discount is 1.5%.

We have to buy five books that cost € 10, € 20, € 30, € 40 and € 50 respectively.

**What is the way to get the maximum discount?**

#### Solution

The way to save as much money as possible is to make two separate purchases totaling € 70 and € 80 each. If the first day we buy books that cost € 10, € 30 and € 40 we get an 8% discount for the next purchase that adds € 70 so the discount will be € 5.60. Curiously, if we make purchases in reverse, first the one of € 70 for which we get a discount of 7% the savings is exactly the same since 7% of 80 is also € 5.60