QuantForcesquant interview practice

RB_CH01_Q010. Apples by truck or by railway

difficulty 1500·answer type: numeric·Not solved

Problem

There are two cities, A and B, 1,000 miles apart. You have 3,000 apples in city A. You want to deliver as many as possible to city B. The only delivery method available is a truck. There are, however, two problems. The truck can hold at most 1,000 apples, and if there are any apples at all in the truck, the hungry dishonest driver will steal and eat one apple for every mile he drives. What is the maximum number of apples you can deliver from City A to City B? Note that you are welcome to stop part way, dump off some apples, and then come back and pick them up later.

Submit answer

You must be signed in to submit answers.