import std.conv; import std.math; import std.numeric; import std.stdio; import std.string; real solveEquation(int a, int b, real t) { //auto g = (T n) => a * n.log + b * n.log.log - t.log; auto g = (real n) => pow(n, a) * pow(n.log, b) - t; real root; if (b > 0) { root = findRoot(g, 1.0L, real.max); } else { root = findRoot(g, 0.0L, real.max); } return root; } void main(){ auto m = readln.chomp.to!int; foreach (i; 0..m) { auto s = readln.split; auto a = s[0].to!int; auto b = s[1].to!int; auto t = s[2].to!real; auto res = solveEquation(a, b, t); writefln("%.10f\n", res); } }