Peter has a large shipment of fuel oil coming in and nothing good to put it in. All he owns is a set of large bottles that all hold the same volume, plus a set of smaller bottles that also all hold the same volume, smaller than the large ones. Given the volume of the shipment, he wants to store the oil so that
- all of the oil is stored,
- every bottle he uses is filled to the top, and
- the number of bottles used is as small as possible.
Peter already worked out the answer for the bottles he owns, but he keeps wondering what happens when the bottle volumes change. Given the volume of the shipment and the two bottle volumes, work out the answer for him.