Fixed Euler #7 to be more efficient