Created
May 3, 2016 07:18
-
-
Save thegreatshasha/16dbf9eb657925b4f5965080b32259bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math as m | |
t = input() | |
while(t): | |
area=0.0 | |
dist=0.0 | |
inp = map(float, raw_input().split(' ')) | |
a=inp[0] | |
area=a*3.0/2.0*inp[1] | |
b=area*2.0/(3.0*inp[2]) | |
c=area*2.0/(3.0*inp[3]) | |
R= a*b*c/(4.0*area); | |
quant=9.0*R**2-(a**2 + b**2 + c**2) | |
if (quant<0.0): | |
quant=0.0 | |
dist=2.0/3.0*m.sqrt(quant) | |
print (round(area, 3),round(dist, 3)) | |
#cout<<setprecision(3)<<area<<" "<<dist<<endl; | |
t = t-1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment