GARDENAR - Area of a Garden

no tags 

One rich person decided to make himself a great garden. The garden should have a from of equilateral triangle. There should be a gazebo inside the garden. The gazebo will be connected with the triangle vertexes by roads. The lengths of all three roads are known. Those numbers are sacred for this rich man. The expense of building such a garden will depend on the area of the garden. Help the rich man by calculating what will be the area of his garden.

Input

The first line of the input contains number t – the amount of tests. Then t test descriptions follow. Each test consist of three integers a, b, c - the lengths of the roads. It is guaranteed that it's possible to build such a garden.

Constraints

1 <= t <= 1000
1 <= a, b, c <= 1000

Output

For each test print the area of the garden rounded to two decimal places.

Example

Input:
1
3 4 5

Output:
19.83

hide comments
Himanshu: 2013-01-13 12:51:58

too easy problem.........
simply relation of hexagon and equilateral tringle...........
got AC!!! in frist attempt!!!

$!:D: 2012-12-26 13:51:01

got ac :) thnxx @anirudh

Anirudh: 2012-12-22 04:44:06

Use double and precise value of root(3) , got AC after two WA.

:): 2012-08-03 09:12:04

very good question...

Miguel Oliveira: 2011-11-07 22:54:17

I solved the problem using binary search (500 iterations just to be safe). I tried but didn't manage to derive a direct formula for the solution. Could anyone give me a few hints?
You can e-mail me if you prefer to not spoil here. thanks!

VAIBHAV NIGAM: 2011-06-27 21:47:42

Can someone tell what is the common mistake in precision... as all my answers seem correct..???

i think there could b precision problem in x*x*sqrt(3)/4...
should we use in-built function to calculate sqrt(3) or 1.732??
I couldn't get where is the precision problem....

Anonymous: 2011-06-15 19:41:44

m gettin wa why all of my cases are running

Gaurav: 2011-06-06 10:05:54

it took me 20 min applying all basic maths formulae and geometry and finally got AC....

Laplace: 2011-03-09 20:26:02

yeppp

Spooky: 2010-06-05 13:35:22

@Sergey Ushacov
you have problems with precision


Added by:Spooky
Date:2009-11-07
Time limit:0.204s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 NODEJS OBJC PERL6 SQLITE VB.NET
Resource:Advancement Autumn 2009, http://sevolymp.uuuq.com/, author: Alexey Shchepin