Submit | All submissions | Best solutions | Back to list |
CIRCLE_E - Three Circle Problem (EASY) |
Given 3 distinct circles with positive integer radius R1, R2, and R3, and arranged like in the picture below:
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 R1, R2, 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
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
|
||||||||
2013-07-12 16:02:33 BroadSword
nice prob...ac in 1 go..thanks to c-ninja |
||||||||
2013-06-29 05:04:04 Alien
very easy prob with python , only 11 lines, only to take care for floating point formatting Last edit: 2013-06-29 05:04:53 |
||||||||
2013-06-02 08:03:39 @DubeY@
what's correct ans for input- 1 1000000000 1000000000 1000000000 |
||||||||
2013-06-02 07:21:23 piyush
i am getting runtime error SIGXFSZ every time. please help..... |
||||||||
2013-06-01 01:48:47 Chandan Mittal
my 50th classical AC:) |
||||||||
2013-05-14 17:03:52 aristofanis
In C/C++ use double; got WA with float... |
||||||||
2013-04-13 17:55:54 codesprout
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 |
||||||||
2013-04-11 08:03:59 raunakrocks
thnak u Tjandra sir AC!! |
||||||||
2013-04-09 21:58:15 raunakrocks
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 |
||||||||
2013-04-09 10:39:01 Kevin Sebastian
im getting NZEC runtime error pls help |