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

def main():
    a,b,d = map(float,input().split())
    d = d*math.pi/180.0
    S = a*b*math.sin(d)/2.0
    c = (a*a+b*b-2.0*a*b*math.cos(d))**(0.5)
    h = S/a*2.0
    print (S,a+b+c,h)



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math 

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

if C == 90 or C == 270:
    h = b
    S = a * h * 0.5
    L = a + b + math.sqrt(a ** 2 + b ** 2)
    
else:
    C = math.radians(C)
    h = b * math.sin(C)
    S = a * h * 0.5
    L = a + b + math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(C))

print(f"{S:.4f}\n{L:.4f}\n{h:.4f}")

Submission status: Accepted

Solution code:
import math
s = input().rstrip().split(' ')
a = float(s[0])
b = float(s[1])
c = float(s[2])
surface = a * b * math.sin(math.radians(c)) / 2
d = math.sqrt((a ** 2) + (b ** 2) - (2 * a * b * math.cos(math.radians(c))))
line = a + b + d
h = surface * 2 / a
print(surface)
print(line)
print(h)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

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

S = a * b * math.sin(math.radians(C)) / 2
c = (a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(C))) ** 0.5
L = a + b + 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(int,input().split())

s = a * b * 0.5 * math.sin(math.radians(c))
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)

Submission status: Accepted

Solution code:
import math
import copy
from copy import deepcopy
import sys
import fractions
# import numpy as np
from functools import reduce
# import statistics
import decimal
import heapq
import collections
import itertools
from operator import mul

sys.setrecursionlimit(100001)


# input = sys.stdin.readline
# sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

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

deg = deg/180*math.pi

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

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

Submission status: Accepted

Solution code:
import math
# 入力
a, b, C = (int(i) for i in input().split())

# Cのラジアン表記、Cradの計算
Crad = C * math.pi / 180

# Sの計算と出力（sinを使った面積計算公式）
S = 0.5 * a * b * math.sin(Crad)
print(S)

# 対辺cの計算（余弦定理）
c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(Crad))

# lの計算と出力
l = a + b + c
print(l)

# hの計算と出力（面積計算公式）
h = 2 * S / a
print(h)

Submission status: Accepted

Solution code:
import math
[a,b,kakudo]=[int(item) for item in input().split()]

h=b*math.sin(math.radians(kakudo))
c=(a*a+b*b - 2*a*b*math.cos(math.radians(kakudo)))**(0.5)
S=a*h/2
print("{} {} {}".format(S,a+b+c,h))

Submission status: Accepted

Solution code:
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 = b * math.sin(c/180*math.pi)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, math
input = sys.stdin.readline

def main():
    a, b, theta = map(int, input().split())
    theta = theta * math.pi / 180
    c = pow(a*a+b*b-2*a*b*math.cos(theta), 0.5)
    h = b * math.sin(theta)
    print(a*h*0.5)
    print(a+b+c)
    print(h)



if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
a,b,C=list(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=b*math.sin(math.radians(C))
print(s)
print(L)
print(H)

Submission status: Accepted

Solution code:
#2020-03-21
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)

Submission status: Accepted

Solution code:
import math
a,b,C = map(float,input().split())
S = 0.5 * 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
x = (a**2+b**2-c**2)/(2*a)
h = math.sqrt(b**2-x**2)
print(round(S,8))
print(round(L,8))
print(round(h,8))

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

Submission status: Accepted

Solution code:
from math import sin,cos,radians

a,b,C=map(int,input().split())
radian = radians(C)
S = 0.5 * a* b * sin(radian)

L2 = a**2 + b**2 - 2*a*b*cos(radian)
L = L2**0.5
around = a + b + L

h = b*sin(radian)

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

Submission status: Accepted

Solution code:
import math

a, b, angle = map(int,input().split())
sin_C = math.sin(math.radians(angle))
cos_C = math.cos(math.radians(angle))
c = math.sqrt((a**2 + b**2) - 2 * a * b * cos_C)
S = (a * b * sin_C) / 2
L = a + b + c
H = S *2 / a 
print("{} {} {}".format(S, L, float(H)))

Submission status: Accepted

Solution code:
import math

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

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

print("{:f}".format(S))
print("{:f}".format(L))
print("{:f}".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
l=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(c)))
l=l+a+b
h=2*s/a
print(s,l,h)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a, b, C = map(float, input().split())
S = 0.5 * a * b * math.sin(C * math.pi / 180.0)
c = math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(C * math.pi / 180.0))
h = b * math.sin(C * math.pi / 180.0)
print("{:.10f}".format(S))
print("{:.10f}".format(a + b + c))
print("{:.10f}".format(h))

Submission status: Accepted

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

rad = (angle / 180) * math.pi

c = (a**2 + b**2 - 2 * a * b * math.cos(rad)) ** 0.5
s = (a+b+c)/2
S = (s*(s-a)*(s-b)*(s-c))**0.5
print(format(S,".5f"))
print(format(a+b+c,".5f"))
print(format((2*S)/a,".5f"))

Submission status: Accepted

Solution code:
import math

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

C = C * math.pi /180

S = a * b * math.sin(C) / 2
L = a + b + math.sqrt(a ** 2 + b ** 2
                             - 2 * a * b *math.cos(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())
C = math.radians(C)
print(1/2 * a * b * math.sin(C))
c = (a ** 2 + b ** 2 - 2 * a * b * math.cos(C)) ** 0.5
print(a + b + c)
print(b * math.sin(C))

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

Solution code:
import math

sc = list(map(float, input().split()))
a = sc[0]
b = sc[1]
c = math.pi * sc[2] / 180

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

print('{:.10f}'.format(s))

print('{:.10f}'.format(a + b + math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(c))))

print('{:.10f}'.format(2 * s / a))

Submission status: Accepted

Solution code:
import math
a,b,C = map(int,input().split())
C = math.radians(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 = 2*S/a
print(S,L,h)

Submission status: Accepted

Solution code:
import sys
import itertools
import math

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b, C = map(int, readline().split())
sinC = math.sin(math.radians(C))
cosC = math.cos(math.radians(C))

print(a * b * sinC / 2, a + b + (a ** 2 + b ** 2 - 2 * a * b * cosC) ** .5, b * sinC,sep='\n')

Submission status: Accepted

Solution code:
import math
a, b, c = map(lambda x: float(x), input().split(" "))
h = math.sin(math.radians(c)) * b
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)

Submission status: Accepted

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

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

height = b * sin(radians(C))
area = a * height * 0.5
rem_a = a - b * cos(radians(C))
c = sqrt(rem_a ** 2 + height ** 2)
L = a + b + c

print("{:.10f}".format(area))
print("{:.10f}".format(L))
print("{:.10f}".format(height))

Submission status: Accepted

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

Submission status: Accepted

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

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

l = a ** 2 + b ** 2 - 2 * a * b * math.cos(C_radian)
l = math.sqrt(l) + a + b

h = b * math.sin(C_radian)

print(S)
print(l)
print(h)

Submission status: Accepted

Solution code:
import math

a, b, c = map(int, input().split())
S = 0.0
L = 0
h = 0.0
if c <= 90:
    h = b * math.sin(math.radians(c))
else:
    h = b * math.sin(math.radians(180 - c))
S = a * h * 0.5
L = (a**2.0 + b**2.0 - 2*a*b*math.cos(math.radians(c)) )**0.5
L = L + a + b
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.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("%f" %S)
print("%f" %L)
print("%f" %h)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math
a,b,c=map(float,raw_input().split())
crad=math.radians(c)
h=b*math.sin(crad)
s=a*h/2
d=(abs((a**2)+(b**2)-(2*a*b*math.cos(crad))))**(0.5)
l=a+b+d
print s
print l
print h

Submission status: Accepted

Solution code:
# coding: utf-8
import math

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

c = math.radians(C)

# 面積
S = a * b * math.sin(c) / 2
print(S)

# 余弦定理
l = (a ** 2 + b ** 2 - 2 * a * b * math.cos(c)) ** (1 / 2)
print(a + b + l)

# 高さ
print(S / a * 2)

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.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:
import math
a, b, c = map(int, input().split())

h = b*math.sin(math.radians(c))
s = h*a/2
l = a+b+(a**2+b**2-2*a*b*math.cos(math.radians(c)))**0.5
print("{:.8f}".format(s))
print("{:.8f}".format(l))
print("{:.8f}".format(h))

Submission status: Accepted

Solution code:
import math

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

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

print(s,L,h)

Submission status: Accepted

Solution code:
import math

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

h = b*math.sin(c/180*math.pi)
s = a*h/2

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

print('%.5f'%s)
print('%.5f'%(a+b+e))
print('%.5f'%h)

Submission status: Accepted

Solution code:
import math

def S(a,b,C):
    s=(a*b*math.sin(math.radians(C)))/2
    return s

def L(a,b,C):
    l=a+b+(a**2+b**2-2*a*b*math.cos(math.radians(C)))**0.5
    return l

def H(a,b,C):
    h=b*math.sin(math.radians(C))
    return h

a,b,C=map(float,input().split())
print(S(a,b,C))
print(L(a,b,C))
print(H(a,b,C))

Submission status: Accepted

Solution code:
import math

a, b, c = list(map(float, input().split()))
c = math.radians(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("{}\n{}\n{}".format(s, l, h))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

if C == 90:
    L = a + b + math.sqrt(a**2 + b**2)
    h = b
    S = (a*b) / 2
else:
    L = a + b + math.sqrt(a**2 + b**2 -2 * a * b * math.cos(math.radians(C)))

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

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

print(S,L,h)

Submission status: Accepted

Solution code:
#初期値の入力
import math
input_data = list(input().split())
a = float(input_data[0])
b = float(input_data[1])
c = int(input_data[2])

#サイン計算
sin = math.sin(math.radians(c))
cos = math.cos(math.radians(c))

#三角形の面積 S、周の長さ L, a を底辺としたときの高さ h
h = b * sin
s = (a * h)/2 
l = math.sqrt(a**2+b**2-2*a*b*cos)

#辺の計算と表示
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(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)

Submission status: Accepted

Solution code:
import math as m

a, b, c = map(float, input().split())
cos_c =  m.cos(m.radians(c))
d = m.sqrt(a ** 2 + b ** 2 - (2 * a * b) * cos_c)

s = (1 / 2) * a * b * m.sin(m.radians(c))
l = a + b + d
h = (2 * s) / a

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

a,b,C = list(map(float,input().split()))
C = math.radians(C)  # radに変換
h = math.sin(C) * b  # 高さを出す
remain = math.sqrt(a ** 2 + b ** 2 - (2 * a * b * math.cos(C)))
S = (a * h)/ 2  # 面積
print(S)
print(a+b+remain)
print(h)

Submission status: Accepted

Solution code:
import math as math
a,b,angle = map(float,input().split())
h = b * math.sin(angle*math.pi/180)
s = a * h / 2
if a < b:
    kata = -a + b * math.cos(angle*math.pi/180)
else:
    kata = a - b * math.cos(angle*math.pi/180)
phi=math.atan(h/kata)
nokori = kata/math.cos(phi)
L = a+b+nokori
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.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(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)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

# インプットデータを受け取る
a, b, c = map(float, input().split())

# 面積Sを求める
S = a * b * math.sin(math.radians(c)) / 2
print(S)

# 周の長さLを求める
L = a + b + math.sqrt(a ** 2 + b ** 2 - (2 * a * b * math.cos(math.radians(c))))
print(L)

# 高さhを求める
h = b * math.sin(math.radians(c))
print(h)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,angle=map(int,input().split(" "))
rad=angle/180*math.pi
h=b*math.sin(rad)
#print(h)
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))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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+(a**2 + b**2 - 2*a*b*cosC)**0.5
h = 2*S/a

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a, b, c = map(float, input().split()) #4, 3, 90
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))