Solution to some Project Euler problems