import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.StringTokenizer; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top * * @author Chiaki.Hoshinomori */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); Task456 solver = new Task456(); int testCount = Integer.parseInt(in.next()); for (int i = 1; i <= testCount; i++) solver.solve(i, in, out); out.close(); } static class Task456 { static double e = Math.exp(1); public void solve(int testNumber, InputReader in, PrintWriter out) { int a = in.nextInt(); int b = in.nextInt(); double t = in.nextDouble(); if (b == 0) { out.printf("%.12f\n", Math.pow(t, 1.0 / a)); return; } if (a == 0) { out.printf("%.12f\n", Math.exp(Math.pow(t, 1.0 / b))); return; } double q = Math.pow(t, 1.0 / b) * a / b; double l = Math.min(e, q); double r = Math.max(e, q); for (int it = 0; it < 40; ++it) { double m = (l + r) / 2; if (m * Math.log(m) > q) { r = m; } else { l = m; } } out.printf("%.12f\n", Math.pow(r, 1.0 * b / a)); } } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } public double nextDouble() { return Double.parseDouble(next()); } } }