prob_9 solve