public void TestForExample() { int[] expectedFactorial = new int[] { 3, 6, 2, 8, 8, 0, 0 }; int[] factorial = ArrayMath.Factorial(10); Assert.AreEqual(expectedFactorial, factorial); }
public override long Solution() { int[] factorial = ArrayMath.Factorial(100); long sum = 0; foreach (int digit in factorial) { sum += digit; } return(sum); }