solution for project euler problem 21