import java.util.*;

public class igloo {

	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 bounds for binary search.
			double low = thick, high = maxVol;

			// Run binary search.
			for (int i=0; i<50; i++) {

				// Try half way in between.
				double mid = (low+high)/2;
				double res = eval(mid, thick);

				// Our guess was too low.
				if (res < maxVol)
					low = mid;

				// Our guess was too high.
				else
					high = mid;
			}

			// Print result.
			System.out.printf("%.3f\n", low);
		}
	}

	// Returns the volume of ice used with outer radius
	public static double eval(double r, double t) {
		return 2.0/3*Math.PI*(r*r*r-(r-t)*(r-t)*(r-t));
	}
}