A bar is offering greatly reduced prices on their draft beer during their happy hour. (See above image for menu prices)
If a group of friends decide that they want to drink a total of liters, how much would it cost them(minimum)?
Details and assumptions:
1) extra for each L drink you buy,
2) extra for each L drink you buy and,
3) extra for each L drink that you buy
For example, if you buy a L drink and pay him , he will give you instead of .
You can buy at most ten L drink.
You can buy drinks in natural numbers, i.e. you can't buy glasses of L drink.
You have just got bills with you.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Due to the barkeeper's illiteracy the new price board becomes as follows.
So, we can conclude that it is better to buy a 2 L drink instead of two 1 L drinks, because, 2 × $ 6 = $ 1 2 > $ 9
Also, we find that the 2 1 L drink is the cheapest. And as specified we can buy only 1 0 such drinks,we order for the specified quantity, i.e. 1 0 × $ 1 = $ 1 0 . Hence we get 5 L.
Now, as we are left with 2 5 − 5 = 2 0 L, we order for 1 0 , 2 L drinks which will cost us 1 0 × $ 9 = $ 9 0
So, the total cost is 1 0 + 9 0 = $ 1 0 0