#include #include #include "testlib.h" using namespace std; typedef long long ll; const int MAX=1000010; bitset isprime; void sieve(){ for(int i=3; i sqf; const ll MAXD=1000000; const ll MAXR=1000000000000000000ll; int main(int argc, char* argv[]){ registerValidation(argc, argv); ll l=inf.readLong(1ll, MAXR); inf.readSpace(); ll r=inf.readLong(1ll, MAXR); ensure(l<=r && r-l<=MAXD); inf.readEoln(); inf.readEof(); sieve(); for(ll i=l; i<=r; i++){ x[i-l]=i; sqf[i-l]=1; } for(ll p=2; p1) sqf[i-l]=0; } } int ans=0; for(ll i=l; i<=r; i++){ if(!sqf[i-l]) continue; if(x[i-l]==1){ ans++; continue; } ll xl=1, xr=1e9+7; while(xr-xl>1){ ll xm=(xl+xr)/2; if(xm*xm<=x[i-l]) xl=xm; else xr=xm; } if(xl*xl!=x[i-l]) ans++; } cout<