Java Primality Test

  • + 0 comments

    System.out.println(new BigInteger(n).isProbablePrime(1)? "prime" : "not prime");