Find a function $f(x)$ which is defined at every real number but is continuous at $0$ and is not continuous at every other number
Give an example of a function $f: \mathbb{R} \to \mathbb{R}$ which is continuous only at $0$.