Solution to Problem 40