import std.algorithm, std.conv, std.range, std.stdio, std.string; import std.math; // math functions import std.typecons; // Tuple, Nullable, BigFlags void main() { auto m = readln.chomp.to!int; foreach (_; 0..m) { auto rd = readln.splitter; auto a = rd.front.to!int; rd.popFront(); auto b = rd.front.to!int; rd.popFront(); auto t = rd.front.to!real; auto calc(real n) { return n ^^ a * log(n) ^^ b - t; } auto mi = 0.1L, ma = mi; while (calc(ma) < 0) ma *= 2; auto bsearch = iota(mi, ma, 1.0e-10L).map!(n => tuple(n, calc(n))).assumeSorted!"a[1] < b[1]"; writefln("%.10f", bsearch.lowerBound(tuple(0, 0)).back[0]); } }