the Sieve of Eratosthenes #include <stdio.h> //输入一个自然数N,按质数定义从小到大输出1~N(包含N)中所有的质数 int main() { int N; scanf("%d", &N); bool isPrime[N+1]; for(int i = 0 ; i < N+1 ; i++) isPrime[i] = true; for(int i = 2; i * i <= N; i++){ if(isPrime[i]){ ...