F - 质数检测 V2

https://vjudge.net/contest/218366

Java解

 1 import java.math.BigInteger;
 2 import java.util.Scanner;
 3 
 4 public class Main {
 5     public static void main(String[] args) {
 6         Scanner cin = new Scanner(System.in);
 7         BigInteger a = cin.nextBigInteger();
 8         Boolean b = a.isProbablePrime(1);
 9         if(b == true)
10             System.out.println("Yes");
11         else
12             System.out.println("No");
13         cin.close();
14     }
15 }
posted @ 2018-04-08 17:43  Surprisez  阅读(119)  评论(0编辑  收藏  举报