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
rollicks_7: 2019-02-09 13:11:29

can someone please explain the problem properly

piyush490: 2018-06-16 22:28:42

Direct formula

ayushgupta1997: 2017-05-23 17:28:17

Hint:dont use 1.732 instead use sqrt(3) cost me 2 WA.Also prefer double instead of float.Very nice and unique problem :)

rajat_singhal: 2017-01-24 18:07:29

not getting the exact answer from formula....what to do???

aditya930: 2016-12-05 09:29:49

easy one once you know the formula...float for a ,b ,c ,area would be sufficient

Govind Lahoti: 2016-01-26 19:04:20

Nice problem :)
Try to derive the formula yourself.

Sankhadeep Banerjee: 2015-08-22 03:43:39

If you face any difficulty,go through this.....
http://www.gogeometry.com/problem/p103_equilateral_triangle_heron_area_elearning.htm

Last edit: 2015-08-22 03:44:23
sy_117: 2015-08-14 22:15:17

Thnxxx @rohitak47

ROHIT Kumar: 2015-07-13 14:24:38

use double for area,as well as other elements a,b,c;
dircetly use the formula


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