Pregunta de entrevista de Teamnet

Implement an optimized loop for different problems.