Project Euler questions done in Swift