#pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include // #include // #include // #include // using namespace __gnu_pbds; // #include // namespace multiprecisioninteger = boost::multiprecision; // using cint=multiprecisioninteger::cpp_int; using namespace std; using ll=long long; using datas=pair; using ddatas=pair; using tdata=pair; using vec=vector; using mat=vector; using pvec=vector; using pmat=vector; // using llset=tree,rb_tree_tag,tree_order_statistics_node_update>; #define For(i,a,b) for(i=a;i<(ll)b;++i) #define bFor(i,b,a) for(i=b,--i;i>=(ll)a;--i) #define rep(i,N) For(i,0,N) #define rep1(i,N) For(i,1,N) #define brep(i,N) bFor(i,N,0) #define brep1(i,N) bFor(i,N,1) #define all(v) (v).begin(),(v).end() #define allr(v) (v).rbegin(),(v).rend() #define vsort(v) sort(all(v)) #define vrsort(v) sort(allr(v)) #define uniq(v) vsort(v);(v).erase(unique(all(v)),(v).end()) #define endl "\n" #define popcount __builtin_popcountll #define eb emplace_back #define print(x) cout< ostream& operator<<(ostream& os,const pair& p){return os<<"("< ostream& operator<<(ostream& os,const vector& v){ os<<"{";bool f=false; for(auto& x:v){if(f)os<<",";os< ostream& operator<<(ostream& os,const set& v){ os<<"{";bool f=false; for(auto& x:v){if(f)os<<",";os< ostream& operator<<(ostream& os,const map& v){ os<<"{";bool f=false; for(auto& x:v){if(f)os<<",";os< inline bool chmax(T& a,T b){bool x=a inline bool chmin(T& a,T b){bool x=a>b;if(x)a=b;return x;} #ifdef DEBUG void debugg(){cout<void debugg(const T& x,const Args&... args){cout<<" "<size;--i)modncrlistm[i-1]=modncrlistm[i]*i%mod; } return modncrlistp[n]*modncrlistm[r]%mod*modncrlistm[n-r]%mod; } ll modpow(ll a,ll n,ll m=mod){ if(n<0)return 0; ll res=1; while(n>0){ if(n&1)res=res*a%m; a=a*a%m; n>>=1; } return res; } ll gcd(ll a,ll b){if(!b)return abs(a);return (a%b==0)?abs(b):gcd(b,a%b);} ll lcm(ll a,ll b){return a/gcd(a,b)*b;} vector dijkstra(pmat& g,ll first){ priority_queue> que; que.emplace(0,first); vector dist(g.size(),inf); while(!que.empty()){ datas x=que.top();que.pop(); if(!chmin(dist[x.second],x.first))continue; for(auto next:g[x.second]){ if(dist[next.second]0); solve(); } ~countingprime(){delete[] pi;} //return π(N/k) long long calc(int k=1){ assert(1<=k&&k<=N); return pi[index(N/k)]; } private: long long *val,*pi,*BIT,N,N2,N3,N6; int *prime; size_t valsize,primesize,BITsize; //x≦val[i]を満たす最大のiを返す(x<1,x>Nは壊れる) size_t index(long long x){return x<=N2?valsize-x:N/x-1;} //BITに最小素因数がN^{1/6}以上の合成数now(=N/∛Nであるから列挙に必要な素数は√N以下の物のみで足りていることに注意 void update(unsigned int id,long long now){ if(prime[id]!=now){ //合成数となる時 for(size_t j=valsize-index(now);j=N3)for(j=valsize-j;j>0;j-=-j&j)x-=BIT[j]; pi[i]-=x; } //小さい方valsize-N3個の変更クエリ(BITのaddクエリ) //addする対称はN/N3以下であって最小素因数がN^{1/6}より大きい合成数の個数に等しい //これはO(N^{2/3})個BITで回すのでO(N^{2/3}log N)(実はlogが落ちているらしいが良く分からないし#logは定数 なのでヨシ!) update(see,prime[see]); ++see; } //BITに貯め込んだ分の精算 for(size_t i=1;ival[∛N+1]から =Σ(∛N≦p≦√N,p:prime)Σ(0≦i≦∛N)(int)(p^2<=val[i]) // =Σ(∛N≦p≦√N,p:prime)Σ(1≦i≦∛N+1)(int)(p^2<=floor(N/i)) // =Σ(1≦i≦∛N+1)Σ(∛N≦p≦√N,p:prime)(int)(p^2<=floor(N/i)) // =Σ(1≦i≦∛N+1)Σ(∛N≦p≦√N,p:prime)(int)(p<=floor(√(N/i))) // ≦Σ(1≦i≦∛N+1)π(√(N/i)) // =O((√N/log N)Σ(1≦i≦∛N+1)1/√i) // Σ(1≦i≦N)1/√i~∫_1^N 1/√xdx~2√Nより =O((√N/log N)(N^{1/6})) // =O(N^{2/3}/log N) while(see>codeforces;while(codeforces--){ ll i,j=0; long double t; cin>>t; // print(countingprime(1103).calc()*116); // print(countingprime(304789).calc()); // print(9*2*49); // print(gcd(21460,882)*gcd(21460,882)); print(-t*0.0009066182916352140081656730925539625953708033240231997190256903*16.42306606643322701531193688324422888053134954993192668605513929); }