#K93002. Maximum Outbound Distance for Drones

    ID: 38322 Type: Default 1000ms 256MiB

Maximum Outbound Distance for Drones

Maximum Outbound Distance for Drones

You are given a battery capacity B and an energy cost per unit distance C for a drone. The drone must travel outbound (and return along the same path), so the maximum outbound distance D is computed by the formula:

\(D = \frac{B}{2C}\)

Your task is to determine the maximum outbound distance the drone can travel for each test case. The answer should be formatted to six decimal places.

This problem is inspired by real-world constraints in unmanned aerial vehicles where energy management is crucial for safe operations.

inputFormat

The first line contains an integer T representing the number of test cases. Each of the next T lines contains two integers: the battery capacity B and the cost per unit distance C for that test case.

Example:

3
100 2
150 3
200 4

outputFormat

For each test case, output the maximum outbound distance the drone can travel, formatted to six decimal places. Print each result on a new line.

Example:

25.000000
25.000000
25.000000
## sample
3
100 2
150 3
200 4
25.000000

25.000000 25.000000

</p>