python solution for problems at http://projecteuler.net/problems