175.Apples Across the Desert
★★★puzzlesJane Street
A truck at a depot holds 2000 apples and can carry at most 1000 at a time. It consumes 1 apple for every mile travelled, in either direction, and may drop apples anywhere to collect later. What is the greatest number of apples that can be delivered to a market 1000 miles away?
Sign in to submit an answer and track it toward your stats.
Sign inHint
While more than one truckload remains you must shuttle, so each mile of progress costs three apples rather than one. Work out where the stock drops to a single load.
Want timed drills, mental math, and a market-making game too? Try the full practice suite →