Add solution for the 10th problem