problem 13 solution