We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- BigNumber
- Java Primality Test
- Discussions
Java Primality Test
Java Primality Test
Sort by
recency
|
272 Discussions
|
Please Login in order to post a comment
import java.io.; import java.math.; import java.security.; import java.text.; import java.util.; import java.util.concurrent.; import java.util.regex.*;
public class Solution { public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
}
System.out.println(new BigInteger(n).isProbablePrime(1)? "prime" : "not prime");