Problem 25 Solution