Adding problem 30 solution.
Starting problem 31.