#include #include #include #include #include #include using namespace std; void SieveOfEratosthenes(vector&prime , int n) { for (int p=2; p*p<=n; p++) { if (prime[p] == true) { for (int i=p*2; i<=n; i += p) prime[i] = false; } } } long long findLeastPrime(vector &prime,long long n){ long long temp = sqrt(n)+1; for(int i=2;i> n; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } /* Enter your code here. Print output to STDOUT */ int nMaxForPrime = 1000010; vector prime(nMaxForPrime,true); SieveOfEratosthenes(prime,nMaxForPrime); long long count = 0; for(int i=0;i