Beispiel #1
0
        public void Problem20()
        {
            string factorialAsString = ((BigInteger)EulerHelperFunctions.Factorial(100)).ToString();

            Assert.Equal(648, EulerHelperFunctions.SumIndividualDigitsInString(factorialAsString));
        }
Beispiel #2
0
        public void Problem16()
        {
            string powerAsString = ((BigInteger)Math.Pow(2, 1000)).ToString();

            Assert.Equal(1366, EulerHelperFunctions.SumIndividualDigitsInString(powerAsString));
        }