Solution for Project Euler 113