public void Part1() { int n = 1000000; SumFactors.Sieve(n); long firstNumber = -1; for (int i = 10000; i < n; i++) { long x = SumFactors.SumDivisors(i) * 10; if (x > 34000000) { firstNumber = i; break; } } Assert.AreEqual(786240, firstNumber); }
public void ExamplePart1(int n, int expected) { SumFactors.Sieve(100); Assert.AreEqual(expected, SumFactors.SumDivisors(n) * 10); }