Solving Project Euler Question