Пример #1
0
        public void Problem3()
        {
            List <long> factors = EulerHelperFunctions.GetAllFactors(600851475143);
            List <long> primes  = EulerHelperFunctions.GetPrimeNumbers(factors);

            Assert.Equal(6857, primes.Max());
        }
Пример #2
0
        public void Problem12()
        {
            long        n = 1;
            long        nthTriangularNumber = 1;
            List <long> factors             = EulerHelperFunctions.GetAllFactors(nthTriangularNumber);

            while (factors.Count <= 500)
            {
                n++;
                nthTriangularNumber += n;
                factors              = EulerHelperFunctions.GetAllFactors(nthTriangularNumber);
            }

            Assert.Equal(76576500, nthTriangularNumber);
        }