Project Euler : Problem 112