solution for problem 100