Exercise 7 - Project Euler - Working Solution