#include "bits/stdc++.h" using namespace std; #define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i)) #define rep(i,j) FOR(i,0,j) #define each(x,y) for(auto &(x):(y)) #define mp make_pair #define mt make_tuple #define all(x) (x).begin(),(x).end() #define debug(x) cout<<#x<<": "<<(x)< pii; typedef vector vi; typedef vector vll; /** b = 0のとき n^a = t a!=0なので より n = t^(1/a) (a,b) = (0,1) log(n) = t >= 1.0 n > e log(n) = log(e^t) n = e^t (a,b) = (0, b) (b!=0) x = e^t^(1/b) (a,b)=(1,1) x = t/W(t) (a,b)=(2,1) x = sqrt(2t/W(2t)) (a,b)=(1,2) x = e^(2W(sqrt(t)/2)) (a,b)=(2,2) x = e^(W(sqrt(T)) a!=0 b!=0 e^(b/a*W(a/b * t^(1/b)) **/ double lambertWFunction(double z) { double w = 5; for(int i = 0; i < 40; ++i) { double ew = exp(w); double x = (w*ew - z) / (ew + w*ew); w = w - x; } return w; } int main(){ ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; while(n--) { int a, b; double t; cin >> a >> b >> t; double ans = 0; if(a == 0) { // e^t^(1/b) ans = exp(pow(t, 1.0 / b)); } else if(b == 0) { // n = t^(1/a) ans = pow(t, 1.0 / a); } else { // e^(b/a*W(a/b * t^(1/b)) double w = lambertWFunction((double)a / b*pow(t, 1.0 / b)); ans = exp((double)b / a*w); } cout << setprecision(20) << ans << endl; } }