public void Test1() { /* * Numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be: * 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... */ var sut = new E012Highlydivisibletriangularnumber(); long expected = 28; var value = sut.GetFirstWithNumbersOfDivisors(above: 5); Assert.Equal(expected, value); }
public void Solution() { /* * What is the value of the first triangle number to have over five hundred divisors? */ var sut = new E012Highlydivisibletriangularnumber(); long expected = 76576500; var value = sut.GetFirstWithNumbersOfDivisors(above: 500); Assert.Equal(expected, value); /* * Congratulations, the answer you gave to problem 12 is correct. * * You are the 194197th person to have solved this problem. */ }