If $f(x) = \begin{cases} 0 & \text{ if }x\in\Bbb R\setminus\Bbb Q\\ 1/q & \text{ if } x = p/q;~p,q\in\Bbb Z,~q\ne 0,~\gcd(p, q)=1 \end{cases}$
Is $f$ Riemann integrable on $[0, 1]$?
If $f(x) = \begin{cases} 0 & \text{ if }x\in\Bbb R\setminus\Bbb Q\\ 1/q & \text{ if } x = p/q;~p,q\in\Bbb Z,~q\ne 0,~\gcd(p, q)=1 \end{cases}$
Is $f$ Riemann integrable on $[0, 1]$?
Hint: In which points is your $f$ continuous?