Project Euler #7 In Python