add test and solution for problem 31