funccountPrimes(n int)int { // find the number of all primes < n strictly ans := 0 np := make([]bool, n) for i := 0; i < n; i++ { np[i] = true } for i := 2; i * i < n; i++ { if np[i] { ans++ for j := i * i; j < n; j += i { np[j] = false } } } return ans }