You have an electric car that you want to use to transport some batteries 1,000 miles. You have 3,000 batteries, but your car can only carry 1,000 of them at once. In addition, for each mile that it travels, the car will need to use up one battery in order to power itself.
How many unspent batteries will you be able to transfer to your destination?
(In reply to
Solution by Ender)
Looking back on it, you actually could end up with 533 and 1/3 batteries left if you wanted to get the absolutely best answer. While you can't drive to 533 1/3 miles from 200 (you can't leave 1/3 of a battery), you can do it from 533. So stop at 200, 533, and 533 1/3. For this new leg, take 1000 batteries from 533, drive 1/3 mile, drop 999 off, drive back (still on the same battery), get the one battery there, drive to 533 1/3 again (STILL on the same battery, which now is dead at the end), and pick up the entire 1000 batteries (immediately using one of these).
Thus, the best stopping points of 200, 533, and 533 1/3 allows 533 1/3 batteries at the very end.
|
Posted by Ender
on 2002-08-30 04:46:17 |