Let $C$ be the cantor set and $f:[0,1]\rightarrow[0,\infty)$ such that $f(x)=0$ if $x\in C$ and $f(x)=k$ on each interval of length $3^{-k}$ in $[0,1]\setminus C$. I want to show that $f$ is measurable and calculate its integral.
Showing that it is measurable looks pretty straight forward, if $t\geq 0$ then
$$\{x\in[0,1]\mid f(x)\leq t\}=\{x\in[0,1]\mid f(x)\leq [t]\}=C\cup\bigcup_{n=1}^{[t]}([0,1]\setminus C_{[t]})$$
where $C_n$ is the sequence used to define $C$, and if $t<0$ it is just the empty set, thus it is measurable and $f$ too.
To compute the integral I just used that, on each step of $[0,1]\setminus C_n$, we add $2^n$ intervals of length $3^{-n}$, so the function has value $n$ there, then it should be
$$\int_{[0,1]}f=\int{[0,1]\setminus C}f=\sum_{n}n2^n\frac{1}{3^n}=6$$
although I do not know how to justify this last step, maybe using some kind of limit theorem, but I can't see exactly how.