Pergunta de entrevista da empresa Amazon

Generic question about picking. Simple algebra