Solution code for ProjectEuler problems