#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define INF (1<<29) #define rep(i,n) for(int i=0;i<(int)(n);i++) #define all(v) v.begin(),v.end() #define uniq(v) v.erase(unique(all(v)),v.end()) double mpow(double a,int b) { double res = 1; while (b) { if (b & 1)res *= a; a *= a; b >>= 1; } return res; } int main() { ios::sync_with_stdio(0); cin.tie(0); int m; cin >> m; rep(i, m) { int a, b; double t; cin >> a >> b >> t; if (a == 0) { printf("%.12f\n", exp(pow(t, 1 / b))); } else if (b == 0) { printf("%.12f\n", pow(t, 1 / a)); } else { double n = 10, d; rep(j, 60) { double x, y, l; x = mpow(n, a - 1); l = log(n); y = mpow(l, b - 1); d = (x*n * y*l - t) / (a*x * y*l + x * b*y); n = n - d; if (fabs(d) < 1e-12)break; } printf("%.12f\n", n); } } return 0; }