My Profile

Keep Up to Date:
Blog RSS
Blog
Forum RSS
Forum
Post New Topic Post Reply
Posted 5 Months, 2 Weeks ago
quest2006
Senior Boarder
Posts: 79
graphgraph
User Offline
 
In a cave lives a wizard who distills a magic potion. Now, you want some of the potion, but you must supply your own viles to carry the potion home in.

Now, at the vile-store the viles are on sale. The viles come in a variety of volumes, all multiples of 1 cubic-centimeters, from 1 cc to 1000 cc's. And the viles come in three colors (for each size): red, yellow, and blue. Viles of any particular size come in packs, one color per pack (the # of viles per pack is large enough that the total volume contained by all of the viles in a pack are at least a 1000 cc's). Thing is: because of the sale, the vile-store has a limit on the number of packs of any particular size that a customer may purchase: only one pack of any vile-size per customer.

So you buy a 1000 packs of viles, 1 for each number of cc's from 1 to 1000, each pack of a different color.

Now, at the wizard's cave, the wizard stipulates that you must fill the viles from his magic-flask as follows: For each sized vile, you must fill completely as many viles of that size from the flask (without refilling the flask from the wizard's still) as you can until less than one vile of that size can be filled.

Then the flask, which contains (possibly) some extra potion in it, is refilled completely from the still, and the process repeats with the next highest size of vile.

So, the entire filling-process is done as soon as the size of the flask is less than the size of the smallest viles you have yet to fill.

Now, before you bought the viles, you called up the wizard to make an appointment, where he stated that if you have ONE more filled red vile than blue vile, then he would give you a 35% discount on the potion.

The thing is, all you know about the size of the wizard's flask is that it is between 1 and 1000 cc's. (You don't even know if it is an even multiple of a cc.)

So, when you are buying the viles, how do you determine which color of each vile-size you should buy as to ensure that you get one more red than blue filled vile?

Thanks, Leroy Quet
The administrator has disabled public write access.
 
Copyright © 2006 - Dec 2008 Fun Quizzes Club