We have a function $f: \mathbb R \to \mathbb R$, $x \mapsto \frac{1}{n}$ when $x \in \mathbb Q, x = \frac{z}{n}, z \in \mathbb Z, n \in \mathbb N, z \text{ and } n$ are coprime, $x \mapsto 0$ when $x \notin \mathbb Q$.
We need to show that $f$ is continuos in any $x \notin \mathbb Q$.
I could not find a formal argument to prove the claim. I guess the general idea here is that, any sequence of rationals approaching an irrational has denominators going to infinity.