import std.algorithm.iteration; import std.conv; import std.math; import std.stdio; import std.string; const real EPS = 1e-9; // https://ja.wikipedia.org/wiki/ランベルトのW関数 T lambertW(T)(T z, T tol=EPS, int iter=1000){ T xi = 1.0f; T xj; foreach (i; 0 .. iter){ xj = xi - (xi * exp(xi) - z) / (exp(xi) + xi * exp(xi)); if (approxEqual(xi, xj, EPS)){ return xj; } xi = xj; } throw new Exception("Failure: No convergence"); } T solveEquation(T)(T a, T b, T t, T tol=EPS){ if (approxEqual(a, 0, EPS)){ return exp(pow(t, 1 / b)); } else if (approxEqual(b, 0, EPS)) { return pow(t, 1 / a); } else { return exp(b / a * lambertW(a / b * pow(t, 1 / b))); } } void main(){ auto m = readln.chomp.to!int; foreach (i; 0..m) { auto s = readln.split.map!(to!real); auto res = solveEquation(s[0], s[1], s[2]); writefln("%.11f\n", res); } }