Added Problem 1's solution.