problem 14 solution