Added Problem 5's solution.