Euler 3 + refactoring to check answers