#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(A == 0) { printf("%.12lf\n", exp(pow(T, 1.0 / B))); } else if(B == 0) { printf("%.12f\n", pow(T, 1.0 / A)); } else { double low = 1, high = exp(10); T = log(T); for(int i = 0; i < 43; i++) { double mid = (low + high) * 0.5; double lgg = log(mid); if(A * lgg + B * log(lgg) >= T) high = mid; else low = mid; } printf("%.12lf\n", low); } } }