Problem:
Triangle For given two sides of a triangle a and b and the angle C between them, calculate the following properties:  S : Area of the triangle  L : The length of the circumference of the triangle  h : The height of the triangle with side a as a bottom edge  Input The length of a , the length of b and the angle C are given in integers. Output Print S , L and h in a line respectively. The output should not contain an absolute error greater than 10 -4 . Sample Input 4 3 90 Sample Output 6.00000000
12.00000000
3.00000000

Solution (Python):
import math

a,b,c = map(int,input().split())
S = a * b * math.sin(math.radians(c)) / 2
L = a + b + math.sqrt(a*a+b*b-2*a*b*math.cos(math.radians(c)))
h = S / a * 2
print(S)
print(L)
print(h)

Solution (Python):
import math

a, b, C = map(float, input().split())

S = 0.5 * a * b *  math.sin(math.radians(C))
L = a + b + math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(math.radians(C)))
h = b * math.sin(math.radians(C))

print(f"{S} {L} {h}")

Solution (Python):
import math
a,b,c=map(float,input().split())
c *= math.pi/180
print("{:.10f}\n{:.10f}\n{:.10f}".format(a*b*math.sin(c)/2, a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(c)), b*math.sin(c)))

Solution (Python):
import math


a, b, c = map(float, input().split())


S = a * b * math.sin(math.radians(c)) / 2
print(S)


L = a + b + math.sqrt(a ** 2 + b ** 2 - (2 * a * b * math.cos(math.radians(c))))
print(L)


h = b * math.sin(math.radians(c))
print(h)

Solution (Python):
import math

if __name__ == "__main__":

    pi = math.pi

    param = input().split()

    a = int(param[0])
    b = int(param[1])
    deg = int(param[2])

    rad = math.radians(deg)

    S = 1/2*a*b*math.sin(rad)
    h = b * math.sin(rad)
    L = a + b + math.sqrt(a**2 + b**2 - 2*a*b*math.cos(rad))

    print(str(S))
    print(str(L))
    print(str(h), end="")

Solution (Python):
from enum import Enum
import sys
import math

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

A,B,DEGREE = map(int,input().split())

rad = math.radians(DEGREE)

S = A*B*math.sin(rad)/2.0
C = math.sqrt(A*A+B*B-2*A*B*math.cos(rad))
h = 2*S/A

print("%.10f %.10f %.10f"%(S,A+B+C,h))

Solution (Python):
import math


a, b, d = [float(i) for i in input().split()]
radian = math.radians(d)
c = (a**2 + b**2 - 2*a*b*math.cos(radian)) ** 0.5
L = a + b + c
S = a * b * math.sin(radian) / 2
h = 2 * S / a
for i in [S, L, h]:
    print("{:.5f}".format(i))

Solution (Python):
import math
a,b,C=map(int,input().split())
c=(a**2+b**2-2*b*a*math.cos(math.radians(C)))**0.5
L=a+b+c
s=(a+b+c)/2
S=(s*(s-a)*(s-b)*(s-c))**0.5
h=2*S/a
print(S,L,h,sep='\n')

Solution (Python):
import math
a, b, C = map(float, input().split())
c = math.sqrt(a**2 + b**2 - (2*a*b*math.cos(math.radians(C))))
L = (a+b+c)
s = L/2
S = math.sqrt(s*(s-a)*(s-b)*(s-c))
h = (2*S)/a
print('{:.8f}'.format(S))
print('{:.8f}'.format(L))
print('{:.8f}'.format(h))

Solution (Python):
import math

a, b, theta_deg = map(int, input().split())
theta_rad = math.radians(theta_deg)

h = b * math.sin(theta_rad)
s = a * h / 2
c = (a ** 2 + b ** 2 - 2 * a * b * math.cos(theta_rad)) ** 0.5
l = a + b + c

print(s)
print(l)
print(h)

Solution (Python):
import math
a, b, angle_c = map(float, input().split(" "))

S = (a * b * math.sin(math.radians(angle_c))) / 2
print(round(S, 8))

L = (a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(angle_c))) ** 0.5
print(round(L + a + b, 8))

h = b * math.sin(math.radians(angle_c))
print(round(h, 8))

Solution (Python):
import math
a,b,c=map(int,input().split())
rad=math.radians(c)
s=a*b*math.sin(rad)/2
print(s)
edge=math.sqrt(a**2 + b**2 - 2*a*b*math.cos(rad))
print(a+b+edge)
print(s*2/a)

Solution (Python):
from math import *

a, b, c = map(int, input().split())
f = - 1
if c >= 90:
    c = 180 - c
    f = 1
c = radians(c)
h = b * sin(c)
s = a * h / 2
l = a + b + sqrt(pow(a + f * sqrt(b * b - h * h), 2) + h * h)
print(s)
print(l)
print(h)

Solution (Python):
import math
a, b, c= map(int, input().split())
s = a * b * math.sin(c/180*math.pi) / 2
l = a + b + math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(c/180*math.pi))
h = 2 * s / a
print('%.8f' %s)
print('%.8f' %l)
print('%.8f' %h)

Solution (Python):
import math
a, b, angle_C = map(float, input().split())
S = 1/2 * a * b * math.sin(math.radians(angle_C))
L = (((a**2 + b**2)-2*a*b*math.cos(math.radians(angle_C)))**(0.5))+a+b
h = (2 * S) / a
print(f"{S:.8f}")
print(f"{L:.8f}")
print(f"{h:.8f}")

Solution (Python):
from math import *
a,b,c=map(int,input().split())
c=c/180*pi
S=0.5*a*b*sin(c)
L=a+b+sqrt(a**2+b**2-2*a*b*cos(c))
h=S*2/a
print('{}'.format(S))
print('{}'.format(L))
print('{}'.format(h))

Solution (Python):
import math

a,b,c=map(float, input().split())

theta=c/180* math.pi
S=0.5*a*b*math.sin(theta)
h=b*math.sin(theta)
L= math.sqrt(a**2+b**2+-2*a*b*math.cos(theta))+a+b

print(S)
print(L)
print(h)

Solution (Python):
import math
a, b, C = map(float, input().split())
C *= math.pi / 180
c = (a**2 + b**2 - 2*a*b*math.cos(C))**0.5
h = b * math.sin(C)
S = a * h * 0.5
L = a + b + c

print("{:.8f}".format(S))
print("{:.8f}".format(L))
print("{:.8f}".format(h))

Solution (Python):
import math
a,b,C = map(float,input().split())
S = a*b*math.sin(math.radians(C))/2
L = a+b+(a**2+b**2-2*a*b*math.cos(math.radians(C)))**0.5
h = S*2/a
print(S)
print(L)
print(h)

Solution (Python):
import math
a, b, c = map(float, input().split())
print(a * b * math.sin(c / 180 * math.pi) / 2)
print(math.sqrt(a ** 2 + b ** 2 - 2 * math.cos(c / 180 * math.pi) * a * b) + a + b)
print(a * b * math.sin(c / 180 * math.pi) / a)

Solution (Python):
import math
  
a,b,c = [ float(s) for s in input().split() ]

height = b * math.sin(math.radians(c))
area = a * height /2
l = math.sqrt(height**2 + (a - b * math.cos(math.radians(c)))**2)
length = a + b +  l
print(area)
print(length)
print(height)

Solution (Python):
from math import *
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

def main():
    a,b,d = map(int, input().split())
    r=radians(d)
    h=b*sin(r)
    s=a*h/2
    l=(a**2+b**2-2*a*b*cos(r))**0.5+a+b
    print(s)
    print(l)
    print(h)

main()

Solution (Python):
import math

l = list(map(int, input().split()))

s = l[0] * l[1] * math.sin(math.radians(l[2])) / 2

L = l[0] + l[1] + (l[0]**2 + l[1]**2 - 2*math.cos(math.radians(l[2]))*l[0]*l[1]) ** (1/2)

h = 2 * s / l[0]

print(s)
print(L)
print(h)

Solution (Python):
import math
a, b, x = map(float, input().split())
h = b*math.sin(math.radians(x))
S = a*h/2
L = a + b + math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(x)))

print(S)
print(L)
print(h)

Solution (Python):
a, b, c = map(int, input().split())

import math

S = (a * b * math.sin(math.radians(c))) / 2
x = math.sqrt(a**2 + b**2 -2*a*b*math.cos(math.radians(c)))
L = a + b + x
h = (2 * S) / a

print(S)
print(L)
print(h)

Solution (Python):
from math import radians, sin, cos

a, b, C = [int(i) for i in input().split()]
t = radians(C)

s = 0.5 * a * b * sin(t)
c2 = a * a + b * b - 2 * a * b * cos(t)
l = a + b + c2**0.5
h = b * sin(t)

print(s)
print(l)
print(h)

Solution (Python):
import math
a , b , c = map(int, input().split())

h= b*math.sin(math.radians(c))
s = a*h/2
l= a+b+(a**2 + b**2 - 2*a*b*math.cos(math.radians(c)))**(1/2)

print(s)
print(l)
print(h)

Solution (Python):
from math import sin,radians,sqrt,cos
a,b,C=list(map(int,input().split()))
S=a*b*sin(radians(C))/2
print(S)
c=sqrt(a**2+b**2-2*a*b*cos(radians(C)))
print(a+b+c)
print(b*sin(radians(C)))

Solution (Python):
import math

a,b,c = map(float,input().split())
s = (a*b*math.sin(math.pi*c/180))/2
l = math.sqrt(a**2+b**2-2*a*b*math.cos(math.pi*c/180))+a+b
h = s*2/a
print(s)
print(l)
print(h)

Solution (Python):
import math
a, b, c = map(int, input().split())

print(a*b*math.sin(math.radians(c))/2)
print(math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(c)))+a+b)
print(b*math.sin(math.radians(c)))

Solution (Python):
import math

a,b,C= [ float( val ) for val in input().split( ' ' ) ]
radiansC = math.radians(C)
h = math.sin(radiansC)*b
S = (a*h)/2
c = math.sqrt( a*a+b*b-2*a*b*math.cos(radiansC) )
L = a+b+c
print( S )
print( L )
print( h )

Solution (Python):
from math import *
a, b, C = map(int, input().split())
C = C/180 * pi
print(a*b/2*sin(C))
print(sqrt(a**2+b**2-2*a*b*cos(C))+a+b)
print(b*sin(C))

Solution (Python):
import math
a,b,c=map(int,input().split())
Sin=math.sin(math.radians(c))
Cos=math.cos(math.radians(c))
S=a*b*Sin*0.5
L=(a**2+b**2-2*a*b*Cos)**0.5+a+b
h=S*2/a
print(S,L,h)

Solution (Python):
import math
a,b,r=[float(k) for k in input().split()]
S=a*b*math.sin(math.radians(r))/2
L=math.sqrt(a**2+b**2-2*math.cos(math.radians(r))*a*b)+a+b
H=S*2/a
print(S,L,H,sep='\n')

Solution (Python):
import math
a, b, C = [float(i) for i in input().split()]
sinC = math.sin(math.radians(C))
S = a*b*sinC/2
print(S)
c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(C*math.pi/180))
print(a + b + c)
h = b*sinC
print(h)

Solution (Python):
import math
a, b, C = map(int,input().split())
C = C*math.pi/180.0
c = math.sqrt(a**2+b**2-2.0*a*b*math.cos(C))
h = b*math.sin(C)
S = 0.5*a*h
L = a+b+c
print(S)
print(L)
print(h)

Solution (Python):
import math
a, b, C = map(int, input().split(" "))
sin = math.sin(math.radians(C))
cos = math.cos(math.radians(C))
print(a*b*sin/2)
print(a + b + (a**2 + b**2 - 2*a*b*cos)**0.5)
print(b*sin)

Solution (Python):
import math
a, b, C = map(int, input().split())
sinC = math.sin(math.radians(C))
cosC = math.cos(math.radians(C))
S = 0.5 * a * b * sinC
L = a + b + math.sqrt((a ** 2) + (b ** 2) - (2 * a * b * cosC))
h = b * sinC
print(S, L, h, sep='\r\n')

Solution (Python):
import math

a,b,angle=map(str,input().split())
a=float(a)
b=float(b)
angle=int(angle)

S=a*b*math.sin(math.radians(angle))/2
c=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(angle)))
print(S)
print(a+b+c)
print(2*S/a)

Solution (Python):
import math
a, b, c =  map(int,input().split())

rad = math.radians(c)

S = a*b*math.sin(rad)/2.0
C = math.sqrt(a*a+b*b-2*a*b*math.cos(rad))
h = 2*S/a
print("%.10f %.10f %.10f"%(S,a+b+C,h))

Solution (Python):
import math
a, b, C = map(int, input().split())
S = a*b*math.sin(math.radians(C))/2
L = a+b+math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(C)))
h = b*math.sin(math.radians(C))
print(S)
print(L)
print(h)

Solution (Python):
import math
a, b, C = list(map(int, input().split()))
h = b * math.sin(math.radians(C))
S = a * h / 2.0
L = a + b + math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(C)))
print(S)
print(L)
print(h)

Solution (Python):
import math
a,b,angle=map(int,input().split(" "))
rad=angle/180*math.pi
h=b*math.sin(rad)

S=a*h*1/2

c=math.sqrt(a**2+b**2-2*a*b*math.cos(rad))
L=a+b+c

print("{:.8f}".format(S))
print("{:.8f}".format(L))
print("{:.8f}".format(h))

Solution (Python):
import math
a,b,c = map(float,input().split())
S = a * b * math.sin(2*math.pi*c/360) /2
L = a+b+ math.sqrt(a*a + b*b - 2*a*b*math.cos(2*math.pi*c/360))
h = b * math.sin(2*math.pi*c/360)
print(S)
print(L)
print(h)

Solution (Python):
import math
a,b,C=map(float,input().split())
s=a*b*math.sin(math.radians(C))/2
print(s)
c=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(C)))
l=a+b+c
print(l)
h=s*2/a
print(h)

Solution (Python):
from math import sin
from math import sqrt
from math import cos
from math import pi

a, b, angle = map(float, input().split())

angle = angle/180 * pi


s = a * b * (1/2) * sin(angle)

l = a + b + sqrt(a**2 + b**2 - 2*a*b*cos(angle))

h = b * sin(angle)

print(s, l, h, sep='\n')

Solution (Python):
import math
a, b, C = map(int, input().split())

sinC = math.sin(math.radians(C))
cosC = math.cos(math.radians(C))

S = (a*b*sinC)/2
L = a+b+(a**2 + b**2 - 2*a*b*cosC)**0.5
h = 2*S/a

print(S)
print(L)
print(h)

Solution (Python):
import math

a,b,C = map(float,input().split())
sinC = math.sin(math.radians(C))
cosC = math.cos(math.radians(C))
c = (a**2 + b**2 - 2*a*b*cosC) ** 0.5
S = a * b * sinC / 2
L = a + b + c
h = S * 2 / a
print('{:.8f}'.format(S))
print('{:.8f}'.format(L))
print('{:.8f}'.format(h))

Solution (Python):
import math
a,b,deg=map(float,input().split())
rad=math.radians(deg)
s=(a*b*math.sin(rad))/2
c=math.sqrt(a**2+b**2-2*a*b*math.cos(rad))
h=2*s/a
print("%.10f %.10f %.10f"%(s,a+b+c,h))

Solution (Python):
import math
a, b, c = map(float, input().split()) 
d = (a**2) + (b**2) - (2*(a*b * math.cos(math.radians(c))))
L = a + b + (d**0.5)
S = a * b * math.sin(math.radians(c)) / 2
h = 2 * S / a
print(str(S))
print(str(L))
print(str(h))

Solution (Python):
import math


a, b, c = list(map(int, input().split()))


h = b * math.sin(math.radians(c))
S = b * math.sin(math.radians(c)) * a / 2.0
d = math.sqrt((a - b*math.cos(math.radians(c)))**2 + h**2)
L = a + b + d


print('{:.15f}'.format(S))
print('{:.15f}'.format(L))
print('{:.15f}'.format(h))

Solution (Python):
import math
a,b,C = map(int,input().split())
C = math.radians(C)
S = (1/2)*a*b*math.sin(C)
print(S)
c = math.sqrt(a**2+ b**2 -2*a*b*math.cos(C))
L = a + b + c
print(L)
h = (math.sin(C)) * b
print(h)

Solution (Python):
from math import radians, sin, cos

a, b, c = [int(i) for i in input().split()]
area = 0.5 * a * b * sin(radians(c))
print(area, a + b + (a * a + b * b - 2 * a * b * cos(radians(c))) ** 0.5, area * 2 / a)

Solution (Python):
import math
a, b, C = [int(x) for x in input().split()]

S = a * b * math.sin(math.radians(C)) / 2
h = b * math.sin(math.radians(C))
L = math.sqrt(a * a + b * b - 2 * a * b * math.cos(math.radians(C)))
print(S)
print(a + b + L)
print(h)

Solution (Python):
import math

a, b, T = map(float, input().split())
t = math.radians(T)
h = b * math.sin(t)
s = h * a / 2
c = ((a - b * math.cos(t)) ** 2 + h ** 2) ** 0.5
l = a + b + c
print(s, l, h)

Solution (Python):
import math
a,b,C=map(int,input().split())
radC=math.radians(C)
S=(1/2)*a*b*math.sin(radC)
L=a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(radC))
h=b*math.sin(radC)
print('{:.8f}'.format(S))
print('{:.8f}'.format(L))
print('{:.8f}'.format(h))

Solution (Python):


import math
a, b, C = map(float, input().split())
rdC = math.radians(C)

h = b * math.sin(rdC)
S = a * h / 2

a1 = b * math.cos(rdC)
a2 = a - a1
e = math.sqrt(a2 ** 2 + h ** 2)
L = a + b + e

print(S)
print(L)
print(h)

Solution (Python):
a,b,c=map(int,input().split())
import math
C=math.radians(c)
k =(a**2+b**2-2*a*b*math.cos(C))**0.5
S = 0.5*a*b*math.sin(C)
L = a+b+k
h = (S*2)/a
print(S)
print(L)
print(h)

Solution (Python):
import math
a,b,C=map(int,input().split())
c=math.sqrt(a*a + b*b - 2*a*b*math.cos(math.radians(C)))
s=(a+b+c)/2
S=math.sqrt(s*(s-a)*(s-b)*(s-c))
L=a+b+c
h=2*S/a
print(f"{S:.5f}\n{L:.5f}\n{h:.5f}")

Solution (Python):
import math
a, b, c = map(int, input().split())

print("%.8f" % (a*b*math.sin(c*math.pi/180)/2))
print("%.8f" % (a + b + math.sqrt(a**2 + b**2 - 2*a*b*math.cos(c*math.pi/180))))
print("%.8f" % (b*math.sin(c*math.pi/180)))

Solution (Python):
import math

a, b, c = [int(x) for x in input().split() ]

s = a * b * math.sin( math.radians(c)) / 2
l = a + b + math.sqrt(
    (b*math.sin(math.radians(c)))**2 + (a - b * math.cos(math.radians(c)))**2)

h = b * math.sin( math.radians(c))
print(s)
print(l)
print(h)

Solution (Python):
a, b, C =map(float,input().split())
import math
sinC = math.sin(math.radians(C))
S = a*b*sinC*0.5
c = (a**2 + b**2 -2*a*b*math.cos(math.radians(C)))**0.5
L = a+b+c
h = S*2/a
print(S)
print(L)
print(h)

Solution (Python):
import math

s = input().split()

a = int(s[0])
b = int(s[1])
c = int(s[2])
sin = math.sin(math.radians(c))
cos = math.cos(math.radians(c))

S = 0.5*a*b*sin 
d = math.sqrt((b*sin)**2+(a-b*cos)**2)
L = a+b+d
h = b*sin
print(S)
print(L)
print(h)

Solution (Python):
import math

a, b, C = map(int, input().split())

s = 1/2 * a * b * math.sin(math.radians(C))

c2 = a**2 + b**2 - 2*a*b * math.cos(math.radians(C))
c = c2 ** 0.5
L = a + b + c

h = 2*s / a

print(s, L, h)

Solution (Python):
import math

def test():

	inputs = list(map(int,input().split()))

	a = float(inputs[0])
	b = float(inputs[1])
	C = float(inputs[2])

	c = (a**2 + b**2 - 2 * a * b * math.cos(math.radians(C)))**0.5
	h = b * math.sin(math.radians(C))
	S = a * h * 0.5
	L = a + b + c

	print(f"{S:.8f} {L:.8f} {h:.8f}")

if __name__ == "__main__":
	test()

Solution (Python):
import math


a,b,c = map(int,input().split())
sin = math.sin(math.radians(c))
y = a*b*sin
print(y/2)
cos = math.cos(math.radians(c))
x = a ** 2 + b ** 2 - 2*a*b*cos
x = math.sqrt(x)
print(a+b+x)
print(b*sin)

Solution (Python):
import math as m

a, b, C = map(float, input().split())

h = b * m.sin(m.pi * C / 180)
d = m.sqrt(a ** 2 + b ** 2 - 2*a * b * m.cos(m.pi * C / 180))
L = a + b + d
S = h * a / 2
print('%f %f %f' % (S, L, h))

Solution (Python):
import math
a, b, C = [int(_) for _ in input().split()]

C_rad = C * math.pi / 180

S = a * b * math.sin(C_rad) / 2
Csq = a ** 2 + b ** 2 - 2 * a * b * math.cos(C_rad)
L = a + b + Csq ** 0.5
h = b * math.sin(C_rad)

print(S)
print(L)
print(h)

Solution (Python):



import math

a, b, angle = [int(i) for i in input().split()]

angle = math.radians(angle)


S = (1/2) * a * b * math.sin(angle)

print(S)







c_sqre = (a ** 2) + (b ** 2) - (2 * a * b * math.cos(angle))

c = math.sqrt(c_sqre)

L = a + b + c
print(L)


h  = b * math.sin(angle)

print(h)

Solution (Python):
import math
a,b,C = map(float,input().split())
C_rad=math.pi*C/180
print("{0:.8f}".format(math.sin(C_rad)*a*b/2))
print("{0:.8f}".format(a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(C_rad))))
print("{0:.8f}".format(b*math.sin(C_rad)))

Solution (Python):
import math
 
a, b, C = map(int, input().split())
 
h = b * math.sin(math.radians(C))
S = a * h * 0.5
L = a + b + math.sqrt(pow(a, 2) + pow(b, 2) - 2 * a * b *math.cos(math.radians(C)))
 
print(S)
print(L)
print(h)

Solution (Python):
import math

a,b,C=map(float,input().split())
cs=math.radians(C)
S=a*b*0.5*math.sin(cs)
c=math.sqrt(a**2+b**2-2*a*b*math.cos(cs))
L=a+b+c
h=S/(a*0.5)

print('%5f'%(S))
print('%5f'%(L))
print('%5f'%(h))

Solution (Python):
from enum import Enum
import sys
import math
 
BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001
 
A,B,DEGREE = map(int,input().split())
 
rad = math.radians(DEGREE)
 
S = A*B*math.sin(rad)/2.0
C = math.sqrt(A*A+B*B-2*A*B*math.cos(rad))
h = 2*S/A
 
print("%.10f %.10f %.10f"%(S,A+B+C,h))

Solution (Python):
from enum import Enum
import sys
import math
 
BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001
 
A,B,DEGREE = map(int,input().split())
 
rad = math.radians(DEGREE)
 
S = A*B*math.sin(rad)/2.0
C = math.sqrt(A*A+B*B-2*A*B*math.cos(rad))
h = 2*S/A
 
print("%.10f %.10f %.10f"%(S,A+B+C,h))

Solution (Python):
import math
 
a,b,C = map(int, input().split())
S = (1/2)*a*b*math.sin(math.radians(C))
L = (a**2+b**2-2*a*b*math.cos(math.radians(C)))**(1/2)+a+b
h = 2*S/a
print(S)
print(L)
print(h)

Solution (Python):
import math
 
a,b,C = map(int, input().split())
S = (1/2)*a*b*math.sin(math.radians(C))
L = (a**2+b**2-2*a*b*math.cos(math.radians(C)))**(1/2)+a+b
h = 2*S/a
print(S)
print(L)
print(h)

Solution (Python):
import math
x, y, z = map(float, input().split())
z = z / 180 * math.pi
print('%.06f' % (x * y * math.sin(z) / 2))
print('%.06f' % ((x**2 + y**2 -2*x*y*math.cos(z))**(1/2) + x + y))
print('%.06f' % (y*math.sin(z)))

Solution (Python):
import math
a, b, c = map(float, input().split())
c = float(math.pi * c / 180)
S = float(0.5 * a * b * math.sin(c))
d = float(math.sqrt(pow(a, 2) + pow(b, 2) - 2 * a * b * math.cos(c)))
L = float(a + b + d)
h = float(2 * S / a)
print(S)
print(L)
print(h)

Solution (Python):
import math

data = input().split()
a = float(data[0])
b = float(data[1])
c = math.radians(int(data[2]))

S = a * b * math.sin(c) * 0.5
print(S)
c = math.sqrt((a**2 + b**2 - 2*a*b*math.cos(c)))
print(a + b + c)
print(S/a * 2)

Solution (Python):
import math

A, B, D = map(float, input().split())

r = math.radians(D)
s = A * B * math.sin(r) / 2
l = A + B + (A ** 2 + B ** 2 - 2 * A * B * math.cos(r))** 0.5
h = B * math.sin(r)

print(s)
print(l)
print(h)

Solution (Python):
import math

a, b, c = map(int, input().split())
rad = c * math.pi / 180
s = 0.5 * a * b * math.sin(rad)
l = a + b + (a ** 2 + b ** 2 - 2 * a * b * math.cos(rad)) ** 0.5
h = b * math.sin(rad)
print(s, l, h, sep='\n')

Solution (Python):
import math

a,b,C=map(float,input().split())
S = min(a,b)*max(a,b)*math.sin(math.radians(C))/2
L = a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(C)))
h = 2*S/a

print("{:.10f}".format(S))
print("{:.10f}".format(L))
print("{:.10f}".format(h))

Solution (Python):
import math
a,b,C = map(int,input().split())
S = 0.5*a*b*math.sin(C*math.pi/180)
c = math.sqrt(a**2+b**2-2*a*b*math.cos(C*math.pi/180))
L = a+b+c
h = 2*S/a
print("%.4f"%S)
print("%.4f"%L)
print("%.4f"%h)

Solution (Python):
from enum import Enum
import sys
import math
 
BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001
 
A,B,DEGREE = map(int,input().split())
 
rad = math.radians(DEGREE)
 
S = A*B*math.sin(rad)/2.0
C = math.sqrt(A*A+B*B-2*A*B*math.cos(rad))
h = 2*S/A
 
print("%.10f %.10f %.10f"%(S,A+B+C,h))

Solution (Python):
import math
a, b, C = map(float, input().split())
rad = (C/180)*math.pi
S = 0.5*a*b*math.sin(rad)
print(S)
L = a + b + math.sqrt(a*a + b*b - 2*a*b*math.cos(rad))
print(L)
h = (S / a)*2
print(h)

Solution (Python):
import math
a, b, c = map(float, input().split())
s = 0.5 * a * b * math.sin(c * math.pi / 180)
l = a + b + (a ** 2 + b ** 2 - 2 * a * b * math.cos(c * math.pi / 180)) ** 0.5
h = 2 * s / a
print("% f\n%f\n%f" % (s, l, h))

Solution (Python):
from math import sin,cos,radians
a,b,c=map(int,input().split())
c=radians(c)
s=a*b*sin(c)*0.5
for i in[s,a+b+(a*a+b*b-2*a*b*cos(c))**0.5,s/a*2]:print('%5f'%i)

Solution (Python):
from math import sin, cos, pi, sqrt
a, b, C = map(int, input().split())
S = a*b*sin(C*pi/180)/2
c = sqrt(a**2 + b**2 - 2*a*b*cos(C*pi/180))
h = 2*S/a
print(S)
print(a+b+c)
print(h)

Solution (Python):
from enum import Enum
import sys
import math

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

A,B,DEGREE = map(int,input().split())

rad = math.radians(DEGREE)

S = A*B*math.sin(rad)/2.0
C = math.sqrt(A*A+B*B-2*A*B*math.cos(rad))
h = 2*S/A

print("%.10f %.10f %.10f"%(S,A+B+C,h))

Solution (Python):
from math import sin,cos,radians
a,b,c=map(int,input().split())
c=radians(c)
s=a*b*sin(c)*0.5
for i in[s,a+b+(a*a+b*b-2*a*b*cos(c))**0.5,s/a*2]:print('%5f'%i)

Solution (Python):
import math 
a, b, C = map(float,input().split())

S = (1/2) * a * b * math.sin(math.radians(C))
L = a + b + math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(C)))
h = S * 2 / a

print("{:.8f}".format(S))
print("{:.8f}".format(L))
print("{:.8f}".format(h))

Solution (Python):
import math as mp
a,b,C = map(int,input().split())
C = mp.radians(C)
print(0.5*a*b*mp.sin(C))
print(a+b+mp.sqrt(a**2+b**2-2*a*b*mp.cos(C)))
print(b*mp.sin(C))

Solution (Python):
import math

a, b, C = input().split()
a = float(a)
b = float(b)
C = float(C)


S = a * b * math.sin(math.radians(C)) / 2


c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(C)))
L = a + b + c


h = b * math.sin(math.radians(C))


print(S)
print(L)
print(h)

Solution (Python):
import math

a, b, C = map(float, input().split())

rad = C*math.pi/180
c = math.sqrt(a**2+b**2-2*a*b*math.cos(rad))

S = a*b*math.sin(rad)/2
L = a+b+c
h = b*math.sin(rad)

print(S)
print(L)
print(h)

Solution (Python):
import math
a,b,C = map(float,input().split())
C_rad=math.pi*C/180
print("{0:.8f}".format(math.sin(C_rad)*a*b/2))
print("{0:.8f}".format(a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(C_rad))))
print("{0:.8f}".format(b*math.sin(C_rad)))

Solution (Python):
import math

a, b, C = map(int,input().split())

S = a * b * (math.sin(math.radians(C))/2)
L = a + b + math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(C)))
h = S*2/a

print(S)
print(L)
print(h)

Solution (Python):
import math
a, b, C = map(float,input().split())
r = math.pi*C / 180 

S = math.sin(r)* a * b / 2
L = a + b + math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(r))
h = b * math.sin(r)

print("{0:.8f}".format(S))
print("{0:.8f}".format(L))
print("{0:.8f}".format(h))

Solution (Python):
import math
a,b,C = map(float,input().split())
C_rad=math.pi*C/180
print("{0:.8f}".format(math.sin(C_rad)*a*b/2))
print("{0:.8f}".format(a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(C_rad))))
print("{0:.8f}".format(b*math.sin(C_rad)))

Solution (Python):
import math
a,b,C = map(float,input().split())
C_rad=math.pi*C/180
print("{0:.8f}".format(math.sin(C_rad)*a*b/2))
print("{0:.8f}".format(a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(C_rad))))
print("{0:.8f}".format(b*math.sin(C_rad)))

Solution (Python):
import math
a,b,C = map(float,input().split())
C_rad=math.pi*C/180
print("{0:.8f}".format(math.sin(C_rad)*a*b/2))
print("{0:.8f}".format(a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(C_rad))))
print("{0:.8f}".format(b*math.sin(C_rad)))

Solution (Python):
import math
a, b, deg = map(int, input().split())
c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(deg)))
s = (a+b+c) / 2
area = (s * (s-a) * (s-b) * (s-c))**0.5
h = area * 2 / a

print(area)
print(a+b+c)
print(h)

Solution (Python):
import math
a,b,C=map(float,input().split())
sinC=math.sin(math.radians(C))
S=a*b*sinC/2
L = (a**2+b**2-2*a*b*math.cos(math.radians(C)))**(1/2)+a+b
h=b*sinC
print(round(S,5))
print(round(L,5))
print(round(h,5))

Solution (Python):
import math
a, b, c = map(int, input().split())
s = a * b * math.sin(math.radians(c)) * 0.5
L = a + b + (a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(c))) ** 0.5
h = s / a * 2
print(s)
print(L)
print(h)

Solution (Python):
import math


def compute_triangle_area(a: float, b: float, c: float) -> float:
    s = (a + b + c) / 2.0
    return math.sqrt(s * (s - a) * (s - b) * (s - c))


def compute_triable_height(a: float, area: float) -> float:
    return 2 * area / a


if __name__ == "__main__":
    a, b, angle = map(lambda x: float(x), input().split())
    c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(angle)))
    area = compute_triangle_area(a, b, c)
    length = a + b + c
    height = compute_triable_height(a, area)
    print(f"{area}")
    print(f"{length}")
    print(f"{height}")

Solution (Python):
import math
T = list(map(float,input().split()))
si = T[2]*(math.pi/180)

S = T[0]*T[1]*(math.sin(si))*(1/2)
L1 = math.sqrt(T[0]**2 + T[1]**2 - 2*T[0]*T[1]*math.cos(si))
L = T[0] + T[1] + L1

x = 2 * S *(1/T[0])
print(S)
print(L)
print(x)

Solution (Python):
from math import sin,cos,radians

a,b,c=map(int,input().split())
c=radians(c)

s=a*b*sin(c)*0.5
l=a+b+(a*a+b*b-2*a*b*cos(c))**0.5
h=s/a*2

for i in[s,l,h]:print('%5f'%i)

Solution (Python):






import sys
import math


class mymath:
    
    pi = 3.14159265358979323846264338

    
    def pnum_eratosthenes(self, n):
        ptable = [0 for i in range(n+1)]
        plist = []

        for i in range(2, n+1):
            if ptable[i]==0:
                plist.append(i)
                for j in range(i+i, n+1, i):
                    ptable[j] = 1
        return plist

    
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

    
    def lcm(self, a, b):
        return (a*b)//self.gcd(a,b)

    
    def mul(self, A, B):
        ans = []
        for a in A:
            c = 0
            for j, row in enumerate(a):
                c += row*B[j]
            ans.append(c)
        return ans

mymath = mymath()


class output:
    
    def list(self, l):
        l = list(l)
        
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()

output = output()






















def get_input():
    N = []
    while True:
        try:
            N.append(input())
        except EOFError:
            break
    return N

def main():
    A, B, C = [float(x) for x in input().split()]
    
    S = 0.5 * A * B * math.sin(math.radians(C))
    D = math.sqrt(A**2 + B**2 - 2*(A*B)*math.cos(math.radians(C)))
    L = A + B + D
    H = (2 * S) / A

    print("%.15f"%S)
    print("%.15f"%L)
    print("%.15f"%H)

if __name__ == '__main__':
    main()

Solution (Python):
import math


a, b, C = map(int, input().split())

C = math.radians(C)
S = a * b * math.sin(C) / 2
L = a + b + math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(C))
h = b * math.sin(C)

print("{:.5f}\n{:.5f}\n{:.5f}".format(S, L, h))

Solution (Python):
import math
a,b,C=map(float,raw_input().split())
rad=math.radians(C)
c=(a**2+b**2-2*a*b*math.cos(rad))**0.5
h=b*math.sin(rad)
print h*a/2
print a+b+c
print h

Solution (Python):
from enum import Enum
import sys
import math
 
BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001
 
A,B,DEGREE = map(int,input().split())
 
rad = math.radians(DEGREE)
 
S = A*B*math.sin(rad)/2.0
C = math.sqrt(A*A+B*B-2*A*B*math.cos(rad))
h = 2*S/A
 
print("%.10f %.10f %.10f"%(S,A+B+C,h))

Solution (Python):

import math

a, b, C = map(float, input().split())
S =  0.5 * a * b * math.sin(C * math.pi / 180)
L = a + b + (a ** 2 + b ** 2 - 2 * a * b * math.cos(C * math.pi / 180)) ** 0.5
h = 2 * S / a

print("%f\n%f\n%f" % (S, L, h))

Solution (Python):
import math
a,b,c=map(int,input().split())
radc=c*math.pi/180
C=(a**2+b**2-2*a*b*math.cos(radc))**0.5
S=a*b*math.sin(radc)*0.5
h=2*S/a
print(S,a+b+C,h,sep='\n')

Solution (Python):
import math
a,b,c = map(float,input().split())

h=b*math.sin(math.radians(c))

s=0.5*a*h

l=a+b+(a**2 + b**2-2*a*b*math.cos(math.radians(c)))**0.5
print(s)
print(l)
print(h)

Solution (Python):
import math
a, b, C = list(map(float, input().split()))
S = 1/2*a*b*math.sin(math.radians(C))
c = pow(pow(a,2)+pow(b,2)-2*a*b*math.cos(math.radians(C)),1/2)
L = a + b + c
h = b*math.sin(math.radians(C))

print(S)
print(L)
print(h)

Solution (Python):
import math
 
a,b,C = map(int, input().split())
S = (1/2)*a*b*math.sin(math.radians(C))
L = (a**2+b**2-2*a*b*math.cos(math.radians(C)))**(1/2)+a+b
h = 2*S/a
print(S)
print(L)
print(h)

Solution (Python):
import math
 
a,b,C = map(int, input().split())
S = (1/2)*a*b*math.sin(math.radians(C))
L = (a**2+b**2-2*a*b*math.cos(math.radians(C)))**(1/2)+a+b
h = 2*S/a
print(S)
print(L)
print(h)

Solution (Python):
import math
a,b,C = map(float,input().split())
C_rad=math.pi*C/180
print("{0:.8f}".format(math.sin(C_rad)*a*b/2))
print("{0:.8f}".format(a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(C_rad))))
print("{0:.8f}".format(b*math.sin(C_rad)))

Solution (Python):
from math import sin, cos, radians
a, b, c = map(int, input().split())
print(a * b * sin(radians(c)) / 2)
print(a + b + ((a ** 2 + b ** 2) - 2 * a * b * cos(radians(c))) ** 0.5)
print(b * sin(radians(c)))

Solution (Python):
import math
a, b, C = map(float, input().split())
S = a*b*math.sin(math.radians(C))/2
L = a + b + math.sqrt(a*a + b*b - 2*a*b*math.cos(math.radians(C)))
h = 2 * S / a
print(f"{S} {L} {h}")

Solution (Python):
import math

a, b, C = map(int,input().split())

S = (1/2)*a*b*math.sin(math.radians(C))
L = (a**2+b**2-2*a*b*math.cos(math.radians(C)))**(1/2)+a+b
h = 2*S/a
print(S)
print(L)
print(h)

Solution (Python):
import math
a,b,C = map(float,input().split())
S = a * b * math.sin(math.radians(C)) / 2
c = math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(math.radians(C)))
L = a + b + c
h = b * math.sin(math.radians(C))
print(S)
print(L)
print(h)

Solution (Python):
import math
a, b, C = map(int,input().split())
C = math.radians(C)
S = 1/2 * a * b * math.sin(C)
c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(C))
h = 2*S/a
L = a + b + c
print(S,L,h)

Solution (Python):
import math

In=input().split( )

a=int(In[0])
b=int(In[1])
C=int(In[2])

s=math.sin((C/180)*3.14159265)
c=math.cos((C/180)*3.14159265)

S=a*b*s/2
L=a+b+math.sqrt(a**2+b**2-2*a*b*c)
h=2*S/a

print(S)
print(L)
print(h)

Solution (Python):
import math
a,b,c = map(int, input().split())
c=math.radians(c)

S = (a*b*math.sin(c))/2
L =a+b+ (a*a +b*b - (2*a*b*math.cos(c)))**0.5
h =b*math.sin(c)

print(S)
print(L)
print(h)