Beispiel #1
0
 [TestCase(2520UL, new ulong[] { 6, 7, 8, 9, 10 })] // 1-10, stripped down.
 public void Lcm_ExamplesWithVariousCountOfNumbers_AreCorrect(ulong result, ulong[] expectedDivisors)
 {
     Assert.AreEqual(result, Factorization.Lcm(expectedDivisors));
 }
Beispiel #2
0
 public ulong Lcm_ExamplesWithTwoNumbers_AreCorrect(ulong a, ulong b)
 {
     return(Factorization.Lcm(a, b));
 }
Beispiel #3
0
 private static ulong GetAnswer()
 {
     // Skips 1 to 10, since they are "covered" in the others
     return(Factorization.Lcm(new ulong[] { 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 }));
 }