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(float,input().split())
sinC=math.sin(math.radians(C))
cosC=math.cos(math.radians(C))
S=1/2*a*b*sinC
print(f'{S}')
c=math.sqrt(a*a+b*b-2*a*b*cosC)
print(f'{a+b+c}')
h=(2*S)/a
print(f'{h}')

Solution (Python):
import math

a,b,cc=map(float,input().split())
sinc=math.sin(math.radians(cc))
cosc=math.cos(math.radians(cc))
c2=a*a+b*b-2*a*b*cosc

c=math.sqrt(c2)


S=(a*b*sinc)/2
L=a+b+c
H=b*sinc


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 = b * math.sin(math.radians(C))
print(S)
print(L)
print(h)

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

Solution (Python):
import math
a,b,c=map(int,input().split())
print('{:.5f}'.format(a*b*math.sin(math.radians(c))/2))
print('{:.5f}'.format(a+b+(a**2+b**2-2*a*b*math.cos(math.radians(c)))**(1/2)))
print('{:.5f}'.format(b*math.sin(math.radians(c))))

Solution (Python):
import math
a,b,C=map(int,input().split())
c = math.radians(C)
x = a**2+b**2-2*a*b*math.cos(c)

S = a*b*math.sin(c)/2
L = a+b+math.sqrt(x)
h = (2*S)/a
print(f'{S:.08f}')
print(f'{L:.08f}')
print(f'{h:.08f}')

Solution (Python):
import math
a,b,C = map(float,input().split())
print('{:.8f}'.format(a*b/2*math.sin(math.radians(C))))
print('{:.8f}'.format(a+b+(a**2+b**2-2*a*b*math.cos(math.radians(C)))**0.5))
print('{:.8f}'.format(b*math.sin(math.radians(C))))

Solution (Python):
import math as m
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
c=m.radians(c)
S=0.5*a*b*m.sin(c)
L=a+b+m.sqrt(a*a+b*b-2*a*b*m.cos(c))
H=b*m.sin(c)
print(S)
print(L)
print(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())
cc = math.sin(math.radians(C))
S = 0.5 * a * b * cc
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(int,input().split())

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

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

Solution (Python):
import math

buf = input().split()

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

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(' ')))
c = math.sqrt(a**2 + b**2)
PI = math.acos(-1)
rad = C * PI / 180
h = b * math.sin(rad)
S = 1/2*a*h
L = a + b + math.sqrt(a**2 + b**2 - 2*a*b * math.cos(rad))
print("{0:.8f}".format(S))
print("{0:.8f}".format(L))
print("{0:.8f}".format(h))

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

Solution (Python):


import math

def main():
    a,b,c = map(int,input().split())
    area=a*(b*math.sin(math.radians(c)))/2
    print("{:.5f}".format(area))
    print("{:.5f}".format(a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(c)))))
    print("{:.5f}".format(2*area/a))

if __name__=="__main__":
    main()

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

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

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

Solution (Python):
import math
a,b,c=map(float,input().split())
C=math.sin(math.radians(c))
D=math.cos(math.radians(c))

S=(1/2)*a*b*C
k=a**2+b**2-2*a*b*D
L=k**(1/2)+a+b
h=2*S/a

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

Solution (Python):
import math

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

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

print(S, L, h)

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

Solution (Python):
import math

a,b,C=map(int,input().split())
C=math.radians(C)
S=a*b*math.sin(C)/2

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

h=S*2/a

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

Solution (Python):
import math

a,b,c=map(int,input().split())
if c<=90:
    print(b*math.sin(math.radians(c))*a/2)
    h=b*math.sin(math.radians(c))
    A=max(a,b)
    B=min(a,b)
    H=B*math.sin(math.radians(c))
    X=(B*B-H*H)**0.5
    C=((A-X)**2+H*H)**0.5
    print(C+a+b)
    print(h)
else:
    print(b*math.sin(math.radians(c))*a/2)
    A=a-b*math.cos(math.radians(c))
    h=b*math.sin(math.radians(c))
    x=(b*b-h*h)**0.5
    c=((A)**2+h*h)**0.5
    print(c+a+b)
    print(h)

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

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

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

h = b*math.sin(Cr)

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

Solution (Python):
import math
a,b,c=map(float,input().split())
sinc=math.sin(math.radians(c))
cosc=math.cos(math.radians(c))
cc=math.sqrt(a**2+b**2-cosc*2*a*b)
h=sinc*(b/1)
print('{:.8f}'.format(a*h*(1/2)))
print('{:.8f}'.format(a+b+cc))
print('{:.8f}'.format(h))

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

S = 0.5 * a * b * math.sin(math.pi * C / 180)
print(S)

c = (a ** 2 + b ** 2 - 2 * a * b * math.cos(math.pi * C / 180)) ** 0.5
L = a + b + c
print(L)

h = 2 * S / a

print(h)

Solution (Python):
import math

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

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

print(S)
print(L)
print(H)

Solution (Python):
import math

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

radian = math.radians(C)
height = b * math.sin(radian)
c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(radian))
print((a*height)/2, a+b+c, height, sep='\n')

Solution (Python):
import math


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

if c == 90:
    h = b
    S = a * h / 2
    L = a + b + math.sqrt(a**2 + b**2)

elif c > 90:
    h = b * math.sin(math.radians(180-c))
    S = a * h / 2
    L = a + b + math.sqrt(h**2 + (a + b * math.cos(math.radians(180 - c)))**2)

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

print(S)
print(L)
print(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 = map(int,input().split())

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

Solution (Python):
import math

a, b, C = [int(n) for n in input().split()]
c = (a**2+b**2-2*a*b*math.cos(math.radians(C)))**0.5
A = (360-2*C)/2
print(0.5*a*b*math.sin(math.radians(C)))
print(a+b+c)
print(b*math.sin(math.radians(C)))

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

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

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

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

print(S, L, h, sep='\n')

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

A = ((a*b) * math.sin(math.radians(c)) * 0.5)
L = math.sqrt((a**2) + (b**2) - (2*a*b) * math.cos(math.radians(c))) + a + b
H = 2 * A / a

print("{:.8f}\n{:.8f}\n{:.8f}".format(A, L, H))

Solution (Python):
import math
if __name__ == '__main__':
    ans = input()
    a, b, C = ans.split()
    a, b, C = int(a), int(b), float(C)
    rad = math.radians(C)
    h = b * math.sin(rad)
    S = a * h / 2
    c = math.sqrt(a**2+b**2-2*a*b*math.cos(rad))
    L = a+b+c

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

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

print(a+b+c)
print(S*2/a)

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

C = math.radians(C)

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

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

Solution (Python):
import math as mt

a, b ,angle = list(map(int,input().split()))
degree = mt.radians(angle)

S = 0.5 * a * b * mt.sin(degree)
c = mt.sqrt((a**2 + b**2) - (2*a*b*mt.cos(degree)))
L = (a + b + c)

s = L / 2
s2 = s*(s-a)*(s-b)*(s-c)
s2 = mt.sqrt(s2)
s2 = 2 * s2  / a
print(S)
print(L)
print(s2)

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

def printing(x):
    print('{:.8f}'.format(x))
    
printing(0.5 * a * b * math.sin(math.radians(c)))
printing(a + b + math.sqrt((a ** 2) + (b ** 2) - 2 * a * b * math.cos(math.radians(c))))
printing(b * math.sin(math.radians(c)))

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

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

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

print(f"{S}\n{L}\n{H}")

Solution (Python):

import math

a, b, angle = map(int, input().split(" "))
angle_rad = math.radians(angle)
h = b * math.sin(angle_rad)
S = a * h / 2

c = (a**2 + b**2 - 2 * a * b * math.cos(angle_rad)) ** (1 / 2)

L = a + b + c

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

Solution (Python):
import math

a,b,C = map(int, input().split(' '))
S = a * b * math.sin(math.radians(C)) / 2
H = (2 * S) / a
L = (a**2 + b**2 - (2*a*b*math.cos(math.radians(C))))**(1/2) + a + b
print(S)
print(L)
print(H)

Solution (Python):
import math
a,b,c=map(float,input().split())
d=math.radians(c)
s=math.sin(d)*0.5*a*b
print(format(s,'.10f'))
e=(a**2+b**2-2*a*b*math.cos(d))**0.5
print(format(e+a+b,'.10f'))
h=2*s/a
print(format(h,'.10f'))

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**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 = 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 = map(float,input().split())
C_rad = math.pi*c/180
print(math.sin(C_rad)*a*b/2)
print(a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(C_rad)))
print(b*math.sin(C_rad))

Solution (Python):
import math
a, b, C = map(float, input().split())
rad_C = C*math.pi/180
c2 =a**2 + b**2 -2*a*b*math.cos(rad_C)
S = 0.5*a*b*math.sin(rad_C)
L = a + b + math.sqrt(c2)
h = 2*S/a
print(S)
print(L)
print(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=s/a*2

print(s,l,h)

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

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

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






print(temp)

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

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

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

print((a*b*sin)/2)
print(a + b + edge)
print(b*sin)

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

h=b*math.sin(math.radians(C))
S=a*h*(1/2)
L=a+b+math.sqrt(pow(a,2)+pow(b,2)-2*a*b*math.cos(math.radians(C)))
print(f'{S:.5f}')
print(f'{L:.5f}')
print(f'{h:.5f}')

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

Solution (Python):
import math

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

kr=math.radians(k)

c2=a**2+b**2-2*a*b*math.cos(kr)
c=c2**(1/2)

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

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

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

Solution (Python):
import math

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


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

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

L = a + b + c

H = b * math.sin(math.radians(rC))

print(S)
print(L)
print(H)

Solution (Python):
import math

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

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

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

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

Solution (Python):

from sys import stdin
import math

A = list(map(float, stdin.readline().split()))
a, b, c = A[0], A[1], A[2]

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

print(format(S,'.8f'))
print(format(L, '.8f'))
print(format(h, '.8f'))

Solution (Python):
import math
a,b,C = map(float,input().split())
S = 1/2*a*b*math.sin(math.radians(C))
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
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)))
L=a+b+(math.sqrt(l))
h=b*(math.sin(math.radians(c)))
print(S)
print(L)
print(h)

Solution (Python):
import math

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

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

S = a*h/2
if C <= 90:
    a1 = (b**2 - h**2)**0.5
    a2 = a - a1
    d = (a2**2 + h**2)**0.5
    L = a + b + d
else:
    a1 = (b**2 - h**2)**0.5
    a2 = a + a1
    d = (a2**2 + h**2)**0.5
    L = a + b + d


print(S, L, h, sep="\n")

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

n = math.radians(c)

d = (a**2+b**2-2*b*a*math.cos(n))**0.5
h = b*math.sin(n)
l = a+b+d
s = a*h/2
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+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 sys
import math

input = sys.stdin.readline

def main():
    a, b, c = map(int, input().rstrip().split())
    
    h = b * math.sin(math.radians(c))
    a_1 = b * math.cos(math.radians(c) - math.pi)
    d = math.sqrt((a + a_1)** 2 + h ** 2)
    
    print(a * h / 2)
    print(a + b + d)
    print(h)
    
if __name__ =="__main__":
    main()

Solution (Python):
import math

def run():
    a,b,C=tuple(map(float,input().split()))
    
    radian=2.0*math.pi*float(C)/float(360.0)
    
    c=math.sqrt(a*a+b*b-2.0*a*b*math.cos(radian))
    
    L=a+b+c
    
    
    
    s=(a+b+c)/2.0
    S=math.sqrt(s*(s-a)*(s-b)*(s-c))
    
    h=2.0*S/a
    
    print(f"{S:.30f}")
    print(f"{L:.30f}")
    print(f"{h:.30f}")


run()

Solution (Python):
import math

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

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

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

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

print(S,L,h)

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

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

sinC=math.sin(math.radians(C))
r=(m/sinC)/2

S=b*a*sinC/2
h=sinC*b
print("{:.4f}".format(S))
print("{:.4f}".format(L))
print("{:.4f}".format(h))

Solution (Python):
import math

a,b,C=map(int,input().split())
s=math.sin(math.radians(C))
t=math.cos(math.radians(C))
S=(a*b*s)/2
l=a+b+math.sqrt(a**2+b**2-2*a*b*t)
h=S*2/a
print('{:.8f}'.format(S),'{:.8f}'.format(l),'{:.8f}'.format(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 + (a**2 + b**2 - 2*a*b*math.cos(math.radians((C))) )**0.5
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))
print(f'{S:.8f}')
L = a + b + (math.sqrt(a**2 + b**2 - 2*a*b*(math.cos(math.radians(C)))))
print(f'{L:.8f}')
h = (S*2)/a
print(f'{h:.8f}')

Solution (Python):


import math

a,b,c = map(float,input().split())
SC = math.sin(math.radians(c))
CC = math.cos(math.radians(c))
s = a**2+b**2-2*a*b*CC
S = math.sqrt(s)
print(0.5*a*b*SC)
print(a+b+S)
print(b*SC)

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

Solution (Python):

import math
a,b,c = map(int,input().split())
rad = c*math.pi/180
m = 0.5*a*b*math.sin(rad)

print("{:.8f}".format(m))
print("{:.8f}".format(a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(rad))))
print("{:.8f}".format(2*m/a))

Solution (Python):
import math

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

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

S = '{:.8f}'.format(s)

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

L = '{:.8f}'.format(a+b+d)

e = 2*s/a

H =  '{:.8f}'.format(e)

print(S)
print(L)
print(H)

Solution (Python):
a,b,c_deg=map(float,input().split())

import  math
c_rad=math.radians(c_deg)

c=math.sqrt(a**2+b**2-2*a*b*math.cos(c_rad))
l=a+b+c
h=math.sin(c_rad)*b
s=a*h/2
print('{:.5f}'.format(s))
print('{:.5f}'.format(l))
print('{:.5f}'.format(h))

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

Solution (Python):
import math

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

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

print('{:.08f}'.format(s))
print('{:.08f}'.format(l))
print('{:.08f}'.format(h))

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

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

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

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

Solution (Python):



import math

a, b, C = map(int, input().split())
S = a * b * 0.5 * math.sin(math.radians(C))
L = a + b + (a * a + b * b - 2 * a * b * math.cos(math.radians(C))) ** 0.5
h = b * math.sin(math.radians(C))

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

Solution (Python):
import math

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

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

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(format(S, '.8f'))
print(format(L, '.8f'))
print(format(h, '.8f'))

Solution (Python):
def resolve():
    import math as m
    a, b, C = [int(i) for i in input().split()]
    c = m.sqrt((a)**2 + (b)**2 - (2 * a * b) * m.cos(m.radians(C)))
    h = b * m.sin(m.radians(C))
    print(a * h / 2)
    print(a + b + c)
    print(h)


resolve()

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 = [int(i) for i in input().split()]

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

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

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

Solution (Python):


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

θ=math.radians(C)

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

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

Solution (Python):
import math

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

rad = math.radians(degree)

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

print(f"{S:.4f} {L:.4f} {H:.4f}")

Solution (Python):
import math

def main():
    a, b, angle = map(int, input().split())
    calc(a, b, angle)

def calc(a, b, angle):
    rad = math.radians(angle)
    S = a * b * math.sin(rad) / 2
    c = math.sqrt(math.pow(a, 2) + math.pow(b, 2) - (2 * a * b * math.cos(rad)))
    L = a + b + c
    h = S * 2 / a
    print(format(S, '.8f'))
    print(format(L, '.8f'))
    print(format(h, '.8f'))

if __name__ == '__main__':
    main()

Solution (Python):
import math

a, b, Cdegree = map(float, input().split())
Cradian = math.radians(Cdegree)


h = b * math.sin(Cradian)

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

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

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

Solution (Python):
import math


def calc_height(b: int, rad: float) -> float:
    h = b * math.sin(rad)
    return h


def calc_area(a: int, h: float) -> float:
    S = a * h / 2
    return S


def calc_lap(a: int, b: int, rad: float) -> float:
    c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(rad))
    L = a + b + c
    return L


def calc():
    a, b, deg = map(int, input().split())
    
    rad = math.radians(deg)

    h = calc_height(b, rad)
    S = calc_area(a, h)
    L = calc_lap(a, b, rad)

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


if __name__ == "__main__":
    calc()

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

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

Solution (Python):
import math
a, b, deg = list(map(float, input().split()))
theta = math.radians(deg)

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

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

h = 2 * S / a

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

Solution (Python):
import math

a, b, C = map(int, 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(f'{S:.8f}')
print(f'{L:.8f}')
print(f'{h:.8f}')

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=(a+b+c)/2
S=s*(s-a)*(s-b)*(s-c)
S=math.sqrt(S)
h=S/a*2
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.0
c = math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(C)))
h = 2*S/a
print(S)
print(a+b+c)
print(h)

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

radi = math.radians(theta)

syahen = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(radi))

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

height = b*math.sin(radi)

print(S)
print(a+b+syahen)
print(height)

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

Solution (Python):

import math
a , b , c = map(int,input().split())
if c == 90:
    S =( a * b ) / 2
    L = a + b + math.sqrt(a**2 + b **2)
    h = b

elif c == 60:
    S = math.sqrt(3) / 4 * a**2
    L = a * 3
    h = math.sqrt(3) / 2 * a
else:
    h = b * math.sin(math.radians(c))
    S = a * h / 2
    L = a + b + math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(c)))
    
print('{:.8f}'.format(S))
print('{:.8f}'.format(L))
print('{:.8f}'.format(h))

Solution (Python):
from math import sin
from math import cos
from math import pi
a, b, C = (int(x) for x in input().split())

angle = pi/180 * C

S = a * b * sin(angle)/2

c = (a ** 2 + b ** 2 - 2*a*b*cos(angle)) ** (1/2)

L = a + b + c

h = 2 * S / a

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

Solution (Python):
import math
a,b,c = map(int,input().split())
th = (math.pi/180)*c

s = 1/2 * a * b * math.sin(th)
c2 = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(th))
l = a + b + c2
h = 2 * s / a

print('{:.8f}'.format(s))
print('{:.8f}'.format(l))
print('{:.8f}'.format(h))

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

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

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

Solution (Python):
import math

a, b, c = [int(arg) for arg in input().split()]
s = a * b * math.sin(math.pi * c / 180) / 2
l = a + b + math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(math.pi * c / 180))
h = 2 * s / a
print(s)
print(l)
print(h)

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

Solution (Python):
import math

a, b, angle = map(float, input().split())
h = b * math.sin(angle / 180 * math.pi)

print("{:.8f}".format(a * h / 2))
print("{:.8f}".format(a + b + math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(angle / 180 * math.pi))))
print("{:.8f}".format(h))

Solution (Python):
import math

a,b,angle = input().split()
a = float(a)
b = float(b)
angle = math.pi * float(angle)/180

c = (a**2+b**2-2*a*b*math.cos(angle))**(1/2)

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

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

Solution (Python):
import math
a,b,theta = list(map(float,input().split()))
S = 0.5*a*b*math.sin(theta*math.pi/180)
c = math.sqrt(a*a+b*b-2*a*b*math.cos(theta*math.pi/180))
L = a+b+c
h = 2*S/a
print('{area:.5f}\n{length:.5f}\n{height:.5f}'.format(area = S,length=L,height=h))

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

Solution (Python):
import math
from sys import stdin
a,b,C = map(float, stdin.readline().split())

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

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

Solution (Python):
import math
a,b,c = map(int,input().split())
sin = math.sin(math.radians(c))
area = a * b * sin / 2
if c == 90:
   h = float(b)
   hypotenuse = math.sqrt(a ** 2 + b ** 2)
elif c > 90:
  h = b * sin
  a_sub = math.sqrt(b ** 2 - h ** 2)
  hypotenuse = math.sqrt((a + a_sub) ** 2 + h ** 2)
elif c < 90:
  h = b * sin
  a_sub = math.sqrt(b ** 2 - h ** 2)
  hypotenuse = math.sqrt((a_sub - a) ** 2 + h ** 2)
around = a + b + hypotenuse
print(f"{area:.8f}")
print(f"{around:.8f}")
print(f"{h:.8f}")

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

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

S = a*b*math.sin(math.radians(C))/2
r = (a**2 + b**2 - 2*a*b*math.cos(math.radians(C)))**(1/2)
L = a + b + r
h = 2*S/a
print(S, L, h, sep="\n")

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

print(f'{s:.8f}')
print(f'{a+b+l:.8f}')
print(f'{h:.8f}')

Solution (Python):
import math

a, b, C = map(int, input().split())
S = a * b * math.sin(C*math.pi/180) / 2
c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(C*math.pi/180))
h = math.sin(C*math.pi/180) * b
print(f'{S:.5f}')
print(f'{a+b+c:.5f}')
print(f'{h:.5f}')

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 + math.sqrt(a**2 + b**2 - (2 * a * b * cosc))

H = b * sinc

print(S, L, H)

Solution (Python):
import math

def main():
 a,b,c = map(int, input().split())
 c = c * (math.pi / 180)

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

 print(s,l,h)

if __name__ == '__main__':
  main()