#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using ull = unsigned long long; constexpr ll TEN(int n) { return (n==0) ? 1 : 10*TEN(n-1); } int bsr(int x) { return 31 - __builtin_clz(x); } const double E = exp(double(1)); double calc(int a, int b, double t) { if (a == 0) { return pow(E, pow(t, 1.0/b)); } if (b == 0) { return pow(t, 1.0/a); } double x = 2; while (true) { double lx = log(x); double u = pow(x, a-1) * pow(lx, b-1); double y = u * x * lx - t; double dx = u * (a * lx + b); double diffx = y/dx; x -= diffx; // newton method if (abs(diffx) < 1e-10) break; } return x; } int main() { int m; scanf("%d", &m); for (int i = 0; i < m; i++) { int a, b; double t; scanf("%d %d %lf", &a, &b, &t); printf("%.12lf\n", calc(a, b, t)); } return 0; }