Solved problem 100 of project euler