CIRCLE_E - Three Circle Problem (EASY)

no tags 

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


hide comments
Anubhav Balodhi : 2014-03-19 09:22:15

Geometry at its very best. Ac

Vipul Pandey: 2014-01-25 19:42:28

as the name suggests- easy.

sarelfeniel: 2014-01-24 07:54:08

Cute problem. Thank goodness I paid attention in the geometry course where we covered such interesting results.

aditya prakash: 2014-01-03 01:44:28

200th AC

kk: 2013-09-23 23:02:51

i'm getting WA..pls check id-10102432

Udit Kumawat: 2013-08-17 09:10:27

@C-NINJA thanks :D

plash batra: 2013-08-05 18:30:20

my 50th problem AC :)

Anant Kumar: 2013-07-13 11:03:37

Just a theory search on wiki and you are good to go.

coding_express: 2013-07-13 08:08:53

please move it to tutorial

pika_pika: 2013-07-13 07:49:58

thanks @C-NINJA


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