#include using namespace std; typedef long long ll; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); ++itr) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second inline double f(double x, int a, int b, double t) { return pow(x,a)*pow(log(x),b) - t; } inline double df(double x, int a, int b) { return pow(x,a-1) * pow(log(x),b-1) * (a*log(x) + b); } int main() { int m; scanf(" %d", &m); while(m--) { int a,b; double t; scanf(" %d %d %lf", &a, &b, &t); double ans; if(a==0) ans = pow(exp(1), pow(t,1.0/b)); else if(b==0) ans = pow(t,1.0/a); else { double x=10; if(a>=2 && b>=2) x=3; double oldx=0; // int ct=0; while(fabs(x-oldx)>1e-9) { // ++ct; oldx = x; x = x - f(x,a,b,t)/df(x,a,b); } // printf("ct=%d\n", ct); ans = x; } printf("%.10f\n", ans); } return 0; }