import java.util.Scanner;
//判断素数
public class Demo1 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count = 0;
for (int i = 2; i <= (int) Math.sqrt(n); i++){
int r = n % i;
if (r == 0){
count++;
break;
}
}
if (count > 0){
System.out.println("no");
}else{
System.out.println("yes");
}
}
}
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交