题解 | #判断是否是素数#
判断是否是素数
http://www.nowcoder.com/questionTerminal/c76fb2da124842079dfefb4da2c5317d
import java.util.Scanner;
import java.math.*;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
Long number = scan.nextLong();
// 使用BigInteger类的工具方法
boolean flag = BigInteger.valueOf(number).isProbablePrime(100);
System.out.println(flag);
}
}