Pregunta de entrevista de Rogers Communications

A simple problem that could be solved using a for-loop.