Solving some Project Euler problems using Swift