import java.util.*;

public class igloo2 {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		int numCases = stdin.nextInt();

		// Process each case.
		for (int loop=0; loop<numCases; loop++) {

			// Get input.
			int maxVol = stdin.nextInt();
			int thick = stdin.nextInt();

			// Set up coefficients for quadratic in r (the outer radius)
			double a = 3*thick;
			double b = -3*thick*thick;
			double c = thick*thick*thick - 3*maxVol/(2*Math.PI);

			// Maximal solution to quadratic - it's guaranteed to exist.
			double x = (-b + Math.sqrt(b*b-4*a*c))/(2*a);

			// Print result.
			System.out.printf("%.3f\n", x);
		}
	}
}