ZS Associates Interview Question

One of the case math questions.