I know that I have to solve this problem indirectly and using the fact that the inverse image of open set is open.
Theorem 4.3
Let $S$ and $T$ be metric spaces and $E $ a subset of $S$. A function $f : E \rightarrow T$ is continuous on $E$ if and only if $f^{−1}(O)$ is open in $E$ for every open set $O \subset T $.
I just don’t know how start!
Thanks.
As $f^{-1}(T \backslash O)=E \backslash f^{-1}(O)$ you can first prove that the inverse image of a closed set is closed.
Then you can prove that $\{0\}$ is closed to conclude.