implementation of test for problem4 of Euler2