Problem

Source: Polish MO Finals 2014

Tags: contests, function, functional equation



Denote the set of positive rational numbers by $\mathbb{Q}_{+}$. Find all functions $f: \mathbb{Q}_{+}\rightarrow \mathbb{Q}_{+}$ that satisfy $$\underbrace{f(f(f(\dots f(f}_{n}(q))\dots )))=f(nq)$$for all integers $n\ge 1$ and rational numbers $q>0$.