solving problems from http://projecteuler.net