Пример #1
0
 public void Can_Be_Solved_With_Basic_Computations()
 {
     Assert.AreEqual(2, FactorialTail.zeroes(10, 10));
     Assert.AreEqual(3, FactorialTail.zeroes(16, 16));
     Assert.AreEqual(8, FactorialTail.zeroes(2, 10));
     Assert.AreEqual(1, FactorialTail.zeroes(997, 997));
     Assert.AreEqual(0, FactorialTail.zeroes(192, 3));
 }
Пример #2
0
 public void Considers_Full_Base_Decomposition()
 {
     Assert.AreEqual(10, FactorialTail.zeroes(12, 26));
     Assert.AreEqual(11, FactorialTail.zeroes(12, 27));
     Assert.AreEqual(12, FactorialTail.zeroes(12, 28));
     Assert.AreEqual(14, FactorialTail.zeroes(12, 32));
     Assert.AreEqual(15, FactorialTail.zeroes(12, 33));
     Assert.AreEqual(10, FactorialTail.zeroes(80, 49));
     Assert.AreEqual(11, FactorialTail.zeroes(80, 50));
 }
Пример #3
0
 public void Can_Be_Solved_With_Basic_Computations()
 {
     Assert.AreEqual(11, FactorialTail.zeroes(12, 27));
     Assert.AreEqual(2, FactorialTail.zeroes(9, 11));
     Assert.AreEqual(1, FactorialTail.zeroes(5, 9));
     Assert.AreEqual(2, FactorialTail.zeroes(5, 12));
     Assert.AreEqual(2, FactorialTail.zeroes(10, 10));
     Assert.AreEqual(3, FactorialTail.zeroes(16, 16));
     Assert.AreEqual(1, FactorialTail.zeroes(12, 5));
     Assert.AreEqual(5, FactorialTail.zeroes(12, 12));
 }
Пример #4
0
 public void Basic_Quirks()
 {
     Assert.AreEqual(2, FactorialTail.zeroes(40, 10));
 }
Пример #5
0
 public void Relatively_Big_Prime_In_Base()
 {
     Assert.AreEqual(5, FactorialTail.zeroes(17, 100));
 }
Пример #6
0
 public void Random_Samples()
 {
     Assert.AreEqual(457, FactorialTail.zeroes(128, 3209));
 }
Пример #7
0
 public void Pushes_To_The_Limits()
 {
     Assert.AreEqual(524287, FactorialTail.zeroes(2, 524288));
 }