Add solution to Problem #1.