Пример #1
0
 public void FindPrime()
 {
     Assert.AreEqual(2, Atkin.findPrime(5));
     Assert.AreEqual(-1, Atkin.findPrime(6));
     Assert.AreEqual(0, Atkin.findPrime(2));
     Assert.AreEqual(1, Atkin.findPrime(3));
     Assert.AreEqual(999, Atkin.findPrime(7919));
     Assert.AreEqual(1, Atkin.findClosestPrime(3));
     Assert.AreEqual(2, Atkin.findClosestPrime(4));
     Assert.AreEqual(3, Atkin.findClosestPrime(8));
     Assert.AreEqual(0, Atkin.findClosestPrime(0));
     Assert.AreEqual(999, Atkin.findClosestPrime(7919));
     Assert.AreEqual(999, Atkin.findClosestPrime(7920));
 }