Pregunta de entrevista de Privalia

Logic problem solved by using for loops