/* #include void self::main(){ ll M=1e5; auto primes=prime_enumerate(M); LL(T); FO(T){ LL(N); DD(P,Q); P/=100,Q/=100; ll c=primes.le_count(N); dd PAB=P*c/N; dd PA=P*c/N+(1-Q)*(N-c)/N; pp(PAB/PA); } } */ #include using namespace std; namespace self{void main();void sub();templatevoid pp(const auto&...a);void epp(const auto&...a);} int main(){cin.tie(nullptr)->sync_with_stdio(0);cout<0;) #define of(i,...) for(auto[i,i##stop,i##step]=for_range(1,__VA_ARGS__);i>=i##stop;i+=i##step) namespace self{ using dd=double; using ll=long long; using ui32=uint32_t; using ui64=uint64_t; templateconstexpr auto for_range(T s,T b){T a=0;if(s)swap(a,b);return array{a-s,b,1-s*2};} void lin(auto&...a){(cin>>...>>a);} constexpr ui64 kth_root_floor(ui64 a,ll k){ if (k==1)return a; auto within=[&](ui32 x){ui64 t=1;FO(k)if(__builtin_mul_overflow(t,x,&t))return false;return t<=a;}; ui64 r=0; of(i,sizeof(ui32)*CHAR_BIT)if(within(r|(1u<using pack_back_t=tuple_element_t>; templateclass Iterator{ private: I it_,begin_,end_; public: Iterator(I it,I begin,I end):it_(it),begin_(begin),end_(end){} ll dist()const{return it_-begin_;} }; } namespace self{ templatestruct vec; templatestruct hvec_helper{using type=vec::type>;}; templatestruct hvec_helper<0,T>{using type=T;}; templateusing hvec=hvec_helper::type; templatestruct vec:vector{ using vector::vector; ll size()const{return vector::size();} auto&emplace_back(auto&&...a){vector::emplace_back(std::forward(a)...);return*this;} auto pop_back(){auto r=this->back();vector::pop_back();return r;} auto first_true(const V&x,auto&&f)const{ auto b=this->begin(),e=this->end(); auto p=partition_point(b,e,[&x,&f](const V&v){return !f(x,v);}); return Iterator{p,b,e}; } auto first_gt(const V&x)const{return first_true(x,[](auto&x,auto&e){return xrequires(sizeof...(A)>=2)vec(const A&...a)->vec>>; } namespace self{ auto prime_enumerate(ll n){ vecsieve(n/3+1,1); for(ll p=5,d=4,i=1,rn=sqrt_floor(n);p<=rn;p+=d=6-d,i++){ if(!sieve[i])continue; for(ll q=(p*p)/3,r=d*p/3+(d*p%3==2),s=p*2;qr{2,3}; for(ll p=5,d=4,i=1;p<=n;p+=d=6-d,i++)if(sieve[i])r.eb(p); while(r.size()&&r.back()>n)r.pop_back(); return r; } } templatevoid self::pp(const auto&...a){const char*c="";((o<