#include #include using namespace std; // cpp_binarysearch (C) @cielavenir under Boost Software License. // returns the smallest value satisfying the predicate. // type F should be something like std::function. template T binarysearch(T lo,T hi,const T eps,const F &predicate){ T r=hi+eps; for(;lo T binarysearch(T lo,T hi,const F &predicate){return binarysearch(lo,hi,(T)1,predicate);} template double binarysearch(double _lo,double _hi,const F &predicate){ long long lo; if(_lo<0)_lo=-_lo,lo=-*(long long*)(&_lo);else lo=*(long long*)(&_lo); long long hi; if(_hi<0)_hi=-_hi,hi=-*(long long*)(&_hi);else hi=*(long long*)(&_hi); long long _r=binarysearch(lo,hi,1LL,[&](long long _mi){ double mi; if(_mi<0)_mi=-_mi,mi=-*(double*)(&_mi);else mi=*(double*)(&_mi); return predicate(mi); }); double r; if(_r<0)_r=-_r,r=-*(double*)(&_r);else r=*(double*)(&_r); return r; } int main(){ int m; double a,b,t; scanf("%d",&m); if(m>100)return 1; for(;m--;){ scanf("%lf%lf%lf",&a,&b,&t); //t=pow(t,1.0/a) printf("%.9f\n",binarysearch(1.0,100.0,[&](const double &n)->bool{ return pow(n,a)*pow(log(n),b)>=t; })); } }