Pergunta de entrevista da empresa Privalia

Logic problem solved by using for loops