#include using namespace std; #define rep(i,n) for(long long i = 0; i < (long long)(n); i++) #define repi(i,a,b) for(long long i = (long long)(a); i < (long long)(b); i++) #define pb push_back #define all(x) (x).begin(), (x).end() template bool chmin(T1 &a, T2 b) { return b < a && (a = b, true); } template bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); } template ostream &operator<<(ostream &o, const pair &v) { o << "(" << v.first << ", " << v.second << ")"; return o; } template ostream &operator<<(ostream &o, const vector &v) { if (!v.empty()) { o << '['; copy(v.begin(), v.end(), ostream_iterator(o, ", ")); o << "\b\b]"; } return o; } using ll = long long; using vll = vector; using vi = vector; typedef pair P; static const double EPS = 1e-14; static const long long INF = 1e18; #define MAX_N 100005 ll m; vll av, bv; vector tv, ret; void solve(ll i) { int a = av[i], b = bv[i]; double t = tv[i]; if (!a) { ret[i] = exp(pow(t, 1.0 / b)); return; } if (!b) { ret[i] = pow(t, 1.0 / a); return; } double rl = 1e-12; double rr = 11; double prev_m = 100; while (1) { double m = (rl + rr) / 2; if (abs(prev_m - m) < 1e-10) break; (pow(m, a) * pow(log(m), b) - t > 0) ? rr = m : rl = m; prev_m = m; } double n = rl; ret[i] = n; } void parallel_rep(int n, function f, ll thnum = 50) { vll range(thnum); rep(i, thnum) range[i] = i * m / thnum; range.pb(m); vector t(thnum); rep(i, thnum) { t[i] = thread([&](ll l, ll r){ repi(j, l, r) solve(j); }, range[i], range[i+1]); } rep(i, thnum) { t[i].join(); } } int main(void) { scanf("%lld", &m); av.resize(m); bv.resize(m); tv.resize(m); ret.resize(m); rep(i, m) { scanf("%lld %lld", &av[i], &bv[i]); scanf("%lf", &tv[i]); } parallel_rep(m, solve, 100); rep(i, m) { printf("%.10f\n", ret[i]); } return 0; }