P15784 [CodeChef] CHDOGS
普及
题目描述

Read problems statements in Mandarin Chinese, Russian and Vietnamese as well.

Chef has three dogs sitting at the vertices of an equilateral triangle. The length of each side of the triangle equals to s meters. Chef gives the command "Start!" and each dog starts to run with constant speed v meters per second. At each moment, each dog is running towards the dog just right to him (in counter-clockwise direction). Therefore, their trajectories are forming some spirals that converging to one point as illustrated below.

How long does it takes dogs to meet each other after the command "Start!"?

------ Input ------

The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
The only line of each test case contains two space-separated integers s and v.

------ Output ------

For each test case, output a single line containing a real number corresponding to the answer of the problem. The answer will be considered correct if its absolute or relative error does not exceed 10^{-6}.

------ Constraints ------

$1 ≤ T ≤ 10$
$1 ≤ s, v ≤ 10^{9}$

------ Subtasks ------

$Subtask #1 (40 points): 1 ≤ s, v ≤ 10$
$Subtask #2 (60 points): original constraints$

----- Sample Input 1 ------
2
2 5
1 1000000000
----- Sample Output 1 ------
0.266667
0.0000001
----- explanation 1 ------
Due to the triangle being very small, but the dogs running extremely fast, they will meet after less than 1e-6 seconds. Thus, due to remark about absolute or relative error in the output section, any answer within [0, 1e-6] will be considered correct.

输入格式

见题面

输出格式

见题面

样例输入
2 2 5 1 1000000000
样例输出
0.266667 0.0000001