#include #include #include using namespace std; const int N = 1 << 19; double lg[N]; void dfs(int k, double l, double r) { if (k < N) { lg[k] = log((l + r) / 2); dfs(k * 2 + 0, l, (l + r) / 2); dfs(k * 2 + 1, (l + r) / 2, r); } } int main() { const double L = 0; const double R = log(10); dfs(1, L, R); int m; cin >> m; while (m--) { int a, b; double t; scanf("%d %d %lf", &a, &b, &t); if (b == 0) { printf("%.12f\n", pow(t, 1.0 / a)); continue; } if (a == 0) { printf("%.12f\n", exp(pow(t, 1.0 / b))); continue; } double ok = R; double ng = L; double logT = log(t); int k = 1; for (int ii = 0; ii < 19; ii++) { double mid = (ok + ng) / 2; double logN = lg[k]; if (a * mid + b * lg[k] >= logT) { k = k * 2 + 0; ok = mid; } else { k = k * 2 + 1; ng = mid; } } for (int ii = 19; ii < 43; ii++) { double mid = (ok + ng) / 2; if (a * mid + b * log(mid) >= logT) { ok = mid; } else { ng = mid; } } printf("%.12f\n", exp(ok)); } }