Find an example of a continuous function $\displaystyle f:[a,b] \in R$, where $\displaystyle a,b \in Q$, such that: 1) $\displaystyle f(q)\in Q $for every rational $\displaystyle q\in [a,b]$; 2) the restriction of f to Q $\displaystyle \cap [a,b]$ does not attain a maximum value.