#include using namespace std; int main() { int m; scanf("%d", &m); while(m--) { int a, b; double t; scanf("%d%d%lf", &a, &b, &t); if (!b) { printf("%.12f\n", pow(t, 1.0 / a)); continue; } if (!a) { printf("%.12f\n", exp(pow(t, 1.0 / b))); continue; } double q = pow(t, 1.0 / b) * a / b; double l = 0, r = (t <= 1 ? 5.73 : 29.6), p; while (r - l > 1e-10) { p = (l + r) / 2; (p * log(p) > q) ? r = p : l = p; } printf("%.12f\n", pow(r, (double)b / a)); } return 0; }