public long Solve() { uint count = 1; while (true) { uint triangleNumber = count * (count + 1) / 2; uint n = Divisors.NumberOfDivisors(triangleNumber); if (n > 500) { return(triangleNumber); } count++; } }
public void TestNumberOfDivisors(uint n, uint expected) { Assert.AreEqual(expected, Divisors.NumberOfDivisors(n)); }