Project Euler by scala No.32