Pregunta de entrevista de Echelon Insurance

A Challenge, and how to solve it