QuikTrip interview question

Solving the right amount change?