problem 185 solution