一.朴素判断素数
1 bool PrimerNumber(int n) 2 { 3 for(int i = 2; i*i <= n; i++) 4 { 5 if(n % i == 0) 6 return false; 7 } 8 return true; 9 }