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



Sample input:
4 3 90


Sample output:
6.00000000
12.00000000
3.00000000

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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
    
    
    #Heron's formula
    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()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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}')

Submission status: Accepted

Solution code:
# coding: utf-8
# 64
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:

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))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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}')

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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))

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

Submission status: Accepted

Solution code:
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'))

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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)

Submission status: Accepted

Solution code:
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}")

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
import math

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

# h = b sin C
h = b * math.sin(Cradian)
# c^2 = a^2 + b^2 - 2 a b cos C
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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 = float(deg * 2 * math.pi / 360)
    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()

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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}')

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
#1_10_B
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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}')

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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}")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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}')

Submission status: Accepted

Solution code:
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}')

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

s=a*b/2*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)

Submission status: Accepted

Solution code:

import math

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

d=math.radians(c)
s=1/2*a*b*math.sin(d)
h=b*math.sin(d)
e=abs(math.sqrt(b**2+a**2-2*a*b*math.cos(d)))
l=a+b+e
print('{:.8f}'.format(s))
print('{:.8f}'.format(l))
print('{:.8f}'.format(h))

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

from math import sin
from math import cos
from math import sqrt
from math import radians
c = radians(c)
S = a * b * sin(c) / 2
c_len = sqrt(a**2 + b**2 -2*a*b*cos(c))
L = a + b + c_len
h = 2*S/a

print(S, L, h)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,C = map(float,input().split())
h = b*math.sin(math.radians(C))
c = math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(C)))
# a2=b2+c2−2bccosA
r = a+b+c
print(a*h/2)

print(r)
print(h)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
import math

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

rC = math.radians(C)
a2 = a ** 2
b2 = b ** 2
ab = a * b

c = math.sqrt(a2 + b2 - 2 * ab * math.cos(rC))

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

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

Submission status: Accepted

Solution code:
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,)

Submission status: Accepted

Solution code:
import math
a,b,kakudo = map(float,input().split())


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

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

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

Submission status: Accepted

Solution code:

import math

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from math import sqrt, sin, cos, pi

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

#度からラジアンへ変換する
C = (C * pi) / 180

#余弦定理を使って計算する
c = sqrt(a**2 + b**2 - 2*a*b*cos(C))
height = b * sin(C)
size = a * height * (1/2)
length = a + b + c

#出力する
print('{:.8f}'.format(size))
print('{:.8f}'.format(length))
print('{:.8f}'.format(height))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

a,b,C = map(float,input().split())
S = 0
L = 0
h = 0

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

Submission status: Accepted

Solution code:
import math

a, b, c = [int(x) for x in input().split()]
theta = c/180*math.pi

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
term = input().split()
a = int(term[0])
b = int(term[1])
c = int(term[2])

sin = math.sin(math.radians(c))
cos = math.cos(math.radians(c))
print('{}'.format(a*b*sin/2))
print('{}'.format(a+b+math.sqrt(a**2 + b**2 - 2*a*b*cos)))
print('{}'.format(b*sin))

Submission status: Accepted

Solution code:
import math

if __name__ == "__main__":
    a, b, C = list(map(int, input().split()))

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

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

Submission status: Accepted

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

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

a1 = math.cos(math.radians(c)) * b
a2 = a - a1
x = (a2 ** 2 + h ** 2) ** 0.5
l = a + b + x

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

print(S, L, h)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
a, b, c = map(float, input().split())
c = c*math.pi/180
S = 0.5*a*b*math.sin(c)
d = (a**2 + b**2 - 2*b*a*math.cos(c))**0.5
L = a + b + d
h = b*math.sin(c)
print (S, L, h, end="\n")

Submission status: Accepted

Solution code:
import math
a, b, C = (float(x) for x in input().split())
S = a * b * math.sin(math.radians(C)) / 2.0
L = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(C))) + a + b
h = b * math.sin(math.radians(C))
print(S)
print(L)
print(h)

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

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

h = b*sin_c

print(S,L,h)

Submission status: Accepted

Solution code:
import math

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

c = math.radians(c)

sinc = math.sin(c)
cosc = math.cos(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,sep="\n")

Submission status: Accepted

Solution code:
import math
a,b,c= map(float,input().split())
def triangle(A,B,C):
    S = math.sin(math.radians(C))*A*B/2
    L = A+B+math.sqrt(A**2+b**2-2*A*B*math.cos(math.radians(C)))
    H=2*S/A
    print(S)
    print(L)
    print(H)

triangle(a,b,c)

Submission status: Accepted

Solution code:
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 = (2*S)/a

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

Submission status: Accepted

Solution code:
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*a+b*b-2*a*b*math.cos(math.radians(c)))
h = 2*s/a
print(s,l,h, sep='\n')

Submission status: Accepted

Solution code:
import math

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

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

S = (1/2) * a * h

x = b * math.cos(math.radians(c))

side = ((a-x)**2 + h**2) ** (1/2)

L = a + b + side

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

Submission status: Accepted

Solution code:
import math

a, b, c = map(int, input().split())
sin_c = math.sin(math.radians(c))
cos_c = math.cos(math.radians(c))

s = (a*b*sin_c) / 2
l = math.sqrt(a**2+b**2-2*a*b*cos_c) + a + b
h = b*sin_c

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

Submission status: Accepted

Solution code:
import math

a, b, C = map(float, input().split())
C = C / 180 * math.pi  # convert to radian

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

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

Submission status: Accepted

Solution code:
import sys
import math
a,b,c=map(int,input().split())
h=float(b)*math.sin(float(c)*math.pi/180.0)
S=float(a)*float(h)/2;
L=float(a)+float(b)+math.sqrt((float(a)*float(a))+(float(b)*float(b))-(2*float(a)*float(b)*math.cos(float(c)*math.pi/180)));
print(str('{:.08f}'.format(S)))
print(str('{:.08f}'.format(L)))
print(str('{:.08f}'.format(h)))

Submission status: Accepted

Solution code:
import math
a,b,c=map(float, input().split())
c=int(c)
c=math.pi*c/180
S=a*b*math.sin(c)/2
L=a+b+(a**2+b**2-2*a*b*math.cos(c))**(1/2)
h=b*math.sin(c)
print(round(S,6))
print(round(L,6))
print(round(h,6))

Submission status: Accepted

Solution code:
import math

class Triangle:
    def __init__(self, a, b, c):
        self.s1 = a
        self.s2 = b
        self.rad = math.radians(c)

    def s3(self):
        return math.sqrt(self.s1**2 + self.s2**2 \
                             - 2*self.s1*self.s2*math.cos(self.rad))

    def area(self):
        return 0.5 * self.s1 * self.s2 * math.sin(self.rad)

    def height(self):
        return b * math.sin(self.rad)

    def length(self):
        return self.s1 + self.s2 + self.s3()


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

print(triangle.area())
print(triangle.length())
print(triangle.height())

Submission status: Accepted

Solution code:
from enum import Enum
import sys
import math


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))

Submission status: Accepted

Solution code:
from math import sin, cos, pi


a, b, theta = map(float, input().split())
theta *= pi / 180
s = 0.5 * a * b * sin(theta) 

print(s) 
print((a ** 2 + b ** 2 - 2 * a * b * cos(theta)) ** 0.5 + a + b)
print(2 * s / a)

Submission status: Accepted

Solution code:
import math


def get_distance(x1, y1, x2, y2) -> float:
    return math.sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2))


def get_area(a, b, c) -> float:
    return a * b * math.sin(c * math.pi / 180) / 2


def get_length(a, b, c) -> float:
    return a + b + math.sqrt(pow(a, 2) + pow(b, 2) - 2 * a * b * math.cos(c * math.pi / 180))


def get_height(b, c) -> float:
    return b * math.sin(c * math.pi / 180)


a, b, c = map(float, input().split(' '))
print(get_area(a, b, c))
print(get_length(a, b, c))
print(get_height(b, c))

Submission status: Accepted

Solution code:
# https://www.calc-site.com/areas/triangle_two_side_angle
from math import sin,cos,sqrt,radians

a,b,C = list(map(int, input().split()))
# 度をラジアンに変換しておく
C = radians(C)
# S
S = 1/2*(a*b*sin(C))
# L
a2,b2 = a**2,b**2
sqrt_p = a2+b2-2*a*b*cos(C)
sqrt_p = sqrt(sqrt_p)
L = a+b+sqrt_p
# h
h = b*sin(C)
print('{:.7f}'.format(S))
print('{:.7f}'.format(L))
print('{:.7f}'.format(h))

Submission status: Accepted

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

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

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

h = (2*s)/a

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

Submission status: Accepted

Solution code:
from math import *
a, b, c = map(int, input().split())
theta = radians(c)
S = 0.5*a*b*sin(theta)
H = 2*S/a
L = sqrt(a*a + b*b - 2*a*b*cos(theta)) + a + b
print('%f %f %f' % (S, L, H))

Submission status: Accepted

Solution code:
import math
import sys
input = sys.stdin.readline().rstrip

a, b, C = map(float, 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(S)
print(L)
print(h)

Submission status: Accepted

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

Submission status: Accepted

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

import math

# rad = a / 180 * math.pi

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

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

h = 2*s/a

print("{:.12f}".format(s))
print("{:.12f}".format(ab+a+b))
print("{:.12f}".format(h))

Submission status: Accepted

Solution code:
# Problem - 三角形

import math

# input
a, b, C = map(int, input().split())
C_radians = math.radians(C)

# calc
area_S = a * b * math.sin(C_radians) / 2
c = math.sqrt(a*a + b*b - 2*a*b*math.cos(C_radians))
length_L = a + b + c
height_h = 2 * area_S / a

# output
print(area_S)
print(length_L)
print(height_h)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import sin,cos,sqrt,radians
#a,b,C=int(input().split())
a,b,C=map(int,input().split())
print("{:.5f}".format(a*b*sin(radians(C))/2))
c2=a**2+b**2-a*b*2*cos(radians(C))
print("{:.5f}".format(a+b+sqrt(c2)))
print("{:.5f}".format(b*sin(radians(C))))

Submission status: Accepted

Solution code:
import math
a, b, C = map(float, input().split())
C = 2*math.pi/360*C

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

Submission status: Accepted

Solution code:
from math import sin, cos, radians

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