import math import sys def main(): input = sys.stdin.read().split() ptr = 0 m = int(input[ptr]) ptr += 1 for _ in range(m): a = int(input[ptr]) b = int(input[ptr+1]) t = float(input[ptr+2]) ptr +=3 if a == 0: exponent = t ** (1.0 / b) n = math.exp(exponent) elif b == 0: n = t ** (1.0 / a) else: # Binary search for n^a * (ln n)^b = t def compute(n_val): log_val = math.log(n_val) pow_log = log_val ** b pow_n = n_val ** a return pow_n * pow_log # Find high high = 2.0 while compute(high) < t: high *= 2 low = high / 2 # Binary search with enough iterations for _ in range(100): mid = (low + high) * 0.5 current = compute(mid) if current < t: low = mid else: high = mid n = high # After sufficient iterations, high is the best approximation # Output up to 12 decimal places print("{0:.12f}".format(n)) if __name__ == "__main__": main()