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
BroadSword: 2013-07-12 16:02:33

nice prob...ac in 1 go..thanks to c-ninja

Alien: 2013-06-29 05:04:04

very easy prob with python , only 11 lines, only to take care for floating point formatting

Last edit: 2013-06-29 05:04:53
@DubeY@: 2013-06-02 08:03:39

what's correct ans for input-
1
1000000000 1000000000 1000000000

piyush: 2013-06-02 07:21:23

i am getting runtime error SIGXFSZ every time. please help.....

Chandan Mittal: 2013-06-01 01:48:47

my 50th classical AC:)

aristofanis: 2013-05-14 17:03:52

In C/C++ use double; got WA with float...

codesprout: 2013-04-13 17:55:54

I am getting correct answer for all the test case. My submission id is 9095530. Please help me understand where I am going wrong.
Ans: test your code with big input, sometimes it print negative number..

Last edit: 2013-04-13 19:44:01
raunakrocks: 2013-04-11 08:03:59

thnak u Tjandra sir AC!!

raunakrocks: 2013-04-09 21:58:15

why gettin WA!! sub id:9073654 plz help :(
giving correct res in test cases?
Ans: your code is overflow for some large input.

Last edit: 2013-04-10 14:58:36
Kevin Sebastian: 2013-04-09 10:39:01

im getting NZEC runtime error pls help


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