the solution for the problem of ReversInteger