Let $X$ be a nonnegative r.v. with cdf $F$ and $E[X]<\infty$. Consider the indicator function. Show that
$$E[X] = \int_{0}^{\infty} F^c(x) dx$$ where $F^c(x) := 1 - F(x)$.
There is a hint provided that says: First claim that $\int_{0}^{\infty} 1_{{X>x}} dx = X$. Use that result to show that $$E[X^m] = m \int_{0}^{\infty}x^{m-1}F^c(x)dx, m \geq 1$$