static boolean zhishu(int a) { int b=a/2; int i=2; for(;i<=b;i++) { if(a%i==0) return false; b=a/i; } return true; }
原文地址:https://www.cnblogs.com/LPworld/p/11175362.html
时间: 2024-10-11 18:06:35
static boolean zhishu(int a) { int b=a/2; int i=2; for(;i<=b;i++) { if(a%i==0) return false; b=a/i; } return true; }
原文地址:https://www.cnblogs.com/LPworld/p/11175362.html