判断素数模板

	public static boolean check(int num) {
		for(int i = 2; i <=Math.sqrt(num); i++) {
			if(num % i == 0)
				return false;
		}
		return true;
	}
原文地址:https://www.cnblogs.com/whisperbb/p/12435625.html