• + 0 comments

    include

    include

    include

    include

    include

    using namespace std;

    int primeTable[100001]; vector primeList; void sieve(){ fill(primeTable,primeTable+100000,0); primeTable[1]=1; for(int i=2;i<=100000;i++){ if(primeTable[i]==0){ primeList.push_back(i); for(int j=i*2;j<=100000;j+=i) primeTable[j]=1; } } }

    bool isPrime[1000001]; void fill_up(int n,int m){ //cout<

    int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n,m; cin>>n>>m; sieve(); fill_up(n,m); int ans=0; for(int i=0;i+2<=m-n;i++){ if(isPrime[i]==false && isPrime[i+2]==false) ans++; } cout<