I try to use the mean value theorem to prove it, but it seems to need extra conditions like the countable set must be ordered and with more conditions.Like $\mathbb{Q}$, if $f$ isn't differentiable on $\mathbb{Q}$, I can't just take $\mathbb{Q}$ as $\mathbb{Q}:=\{a_0,a_1,a_2,....,a_n,...\}$ and use the theorem on $[0,a_0]$,....,and so on.
It has been shown that this question is the corollary of If $f$ is continuous and $f'(x)\ge 0$, outside of a countable set, then $f$ is increasing