素数 素数一般判定方法 bool isPrime(a) { if (a < 2) return 0; for (int i = 2; i * i <= a; ++i) if (a % i) return 0; return 1; } 但对于long long int的数,O(√n)的复杂度还是会时间 Read More
posted @ 2020-02-25 22:26 Ldler Views(366) Comments(0) Diggs(0) Edit