My attempt at Project Euler