Add solution to Problem 10