Problema 6, XII Olimpiada Iberoamericana