import strutils, sequtils, math, strscans proc printf(formatstr: cstring) {.header: "", importc: "printf", varargs.} # proc f(n, a, b : float64): float64 = pow(n, a) * pow(ln(n), b) proc f(n, a, b : float64): float64 = a*ln(n) + b*ln(ln(n)) when isMainModule: var m: int input = stdin.readLine discard input.scanf("$i", m) for i in 0..m-1: var a, b, t: float64 input = stdin.readLine discard input.scanf("$f $f $f", a, b, t) var (l, r) = (0.0, 1000000000.0) for i in 1..64: var mid = (l + r) / 2 if f(mid, a, b) <= ln(t): l = mid else: r = mid printf("%.11f\n", r)