#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i)) #define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i)) static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL; typedef vector vi; typedef pair pii; typedef vector > vpii; typedef long long ll; template static void amin(T &x, U y) { if(y < x) x = y; } template static void amax(T &x, U y) { if(x < y) x = y; } int main() { int T; scanf("%d", &T); rep(ii, T) { int a, b; long double t; scanf("%d%d%Lf", &a, &b, &t); //a log n + b log log n = log t auto logt = log(t); auto x = max(2.L, min(exp(logt / a), exp(exp(logt / b)))); rep(k, 10) { auto logx = log(x); x -= (x * logx * (a * logx + b * log(logx) - logt)) / (a * logx + b); x = max(x, 1.L+1e-13); } printf("%.20Lf\n", x); } return 0; }