solving problems from projecteuler