📅  最后修改于: 2022-03-11 14:59:58.254000             🧑  作者: Mango
public class Prime {
public static boolean isPrime(int num) {
if (num<2)
return false;
for(int i=3;i<=Math.sqrt(num);i+=2)
if(num%i==0)
return false ;
return true ;
}
}