CIRCLE_E - Three Circle Problem (EASY)

Given 3 distinct circles with positive integer radius R1R2, and R3, and arranged like in the picture below:

Three Circle Problem

Now, your task is to compute radius of small circle that can be created like yellow circle in the picture above. All circles in the picture above tangent each other.

Input

The first line in the input data, there is an integer T(0 < T ≤ 103) denoting number of test cases, than T lines follow.

For each lines, there are three integer R1R2, and R3, (0 < {R1,R2,R3} < 109) denoting radius of each circle like in the picture above.

Output

For each test case, output radius of small circle that can be made, like in the picture above. Any output with absolute error less than 10-6 is accepted.

Example

Input:
3
1 1 1
10 10 10
23 46 69

Output:
0.154701
1.547005
6.000000

 

You can see my submission history and time record for this problem: here

See also: Another problem added by Tjandra Satria Gunawan


Added by:Tjandra Satria Gunawan
Date:2013-04-05
Time limit:1s
Source limit:10000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:Own Problem

hide comments
2014-03-19 09:22:15 Anubhav Balodhi
Geometry at its very best. Ac
2014-01-25 19:42:28 Vipul Pandey
as the name suggests- easy.
2014-01-24 07:54:08 sarelfeniel
Cute problem. Thank goodness I paid attention in the geometry course where we covered such interesting results.
2014-01-03 01:44:28 aditya prakash
200th AC
2013-09-23 23:02:51 kk
i'm getting WA..pls check id-10102432
2013-08-17 09:10:27 Udit Kumawat
@C-NINJA thanks :D
2013-08-05 18:30:20 plash batra
my 50th problem AC :)
2013-07-13 11:03:37 Anant Kumar
Just a theory search on wiki and you are good to go.
2013-07-13 08:08:53 coding_express
please move it to tutorial
2013-07-13 07:49:58 pika_pika
thanks @C-NINJA
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.