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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import radians, sin, cos

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

s = input().split()

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

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

Submission status: Accepted

Solution code:
import math

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

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

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

h = 2*s / a

print(s, L, h)

Submission status: Accepted

Solution code:
import math

def test():

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

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

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

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

if __name__ == "__main__":
	test()

Submission status: Accepted

Solution code:
import math


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

Submission status: Accepted

Solution code:
import math as m

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

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

Submission status: Accepted

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

C_rad = C * math.pi / 180

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

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

Submission status: Accepted

Solution code:
#! python3
# triangle.py - 三角形の面積、周、高さの計算

import math

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

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

print(S)

# 周を求める
# if angle <= 90:
#     c_sqre = (a ** 2) + (b ** 2) + (2 * a * b * math.cos(math.radians(angle))# )
# else :
#     c_sqre = (a ** 2) + (b ** 2) + (-1 * 2 * a * b * math.cos(math.radians# (angle)))

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

c = math.sqrt(c_sqre)
# print(c)
L = a + b + c
print(L)

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

print(h)

# print(angle)
# print(math.sin(math.radians(90)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

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,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
x, y, z = map(float, input().split())
z = z / 180 * math.pi
print('%.06f' % (x * y * math.sin(z) / 2))
print('%.06f' % ((x**2 + y**2 -2*x*y*math.cos(z))**(1/2) + x + y))
print('%.06f' % (y*math.sin(z)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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)
l = a + b + (a ** 2 + b ** 2 - 2 * a * b * math.cos(c * math.pi / 180)) ** 0.5
h = 2 * s / a
print("% f\n%f\n%f" % (s, l, h))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

# 最後の一辺(余弦定理)
c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(C)))
L = a + b + c

# aを底辺としたときの高さ
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())

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

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

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

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 = S*2/a

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
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())
sinC=math.sin(math.radians(C))
S=a*b*sinC/2
L = (a**2+b**2-2*a*b*math.cos(math.radians(C)))**(1/2)+a+b
h=b*sinC
print(round(S,5))
print(round(L,5))
print(round(h,5))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


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


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


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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
from math import sin,cos,radians

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

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

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

Submission status: Accepted

Solution code:
# coding=utf-8

###
### for atcorder program
###

import sys
import math

# math class
class mymath:
    ### pi
    pi = 3.14159265358979323846264338

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

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

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

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

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

mymath = mymath()

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

output = output()

### input sample
#i = input()
#N = int(input())
#A, B, C = [x for x in input().split()]
#N, K = [int(x) for x in input().split()]
#inlist = [int(w) for w in input().split()]

#R = float(input())
#A.append(list(map(int,input().split())))

#for line in sys.stdin.readlines():
#    x, y = [int(temp) for temp in line.split()]

#abc list
#abc = [chr(ord('a') + i) for i in range(26)]

### output sample
#print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
#print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
#print(" {}".format(i), end="")

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

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math


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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

s=0.5*a*h

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

In=input().split( )

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

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import decimal
import math


a, b, C = map(decimal.Decimal, input().split())


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

c = decimal.Decimal(math.sqrt(a ** decimal.Decimal("2") + b ** decimal.Decimal("2") - decimal.Decimal("2") * a * b * decimal.Decimal(math.cos(math.radians(C)))))
L = a + b + c
h = b * decimal.Decimal(math.sin(math.radians(C)))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ITP_10_B
import math

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

Submission status: Accepted

Solution code:
a, b, c = map(float, input().split())
import math
s=f"{0.5*a*b*(math.sin(c*(math.pi)/180)):.8f}"
L=f"{a+b+math.sqrt(a*a+b*b-2*a*b*(math.cos(c*(math.pi)/180))):.8f}"
h=f"{b*(math.sin(c*(math.pi)/180)):.8f}"
print(s)
print(L)
print(h)

Submission status: Accepted

Solution code:
import math
#N = int(input())
a,b,c = map(int, input().split())
#print (min(A), max(A), sum(A))
si = math.sin(math.radians(c))
cs = math.cos(math.radians(c))

ta = (b * si)
print(ta * a/2)
yf = (a-(b*cs))
d = math.sqrt((yf * yf) + (ta * ta))
print(a+b+d)
print(ta)

Submission status: Accepted

Solution code:
import math

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

print("%f"%(1/2*a*b*math.sin(math.radians(C))))
print("%f"%(a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(C)))))
print("%f"%((1/2*a*b*math.sin(math.radians(C)))/a*2))

Submission status: Accepted

Solution code:
import cmath, math

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

th = math.radians(dig)
pos_a = complex(a,0.0)
pos_b = cmath.rect(b,th)

c = abs(pos_a-pos_b)

print (pos_a.real * pos_b.imag /2.0)
print (a + b + c)
print (pos_b.imag)

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

a, b, C = map(int, input().split())
C *= pi / 180
print(a * b * sin(C) / 2)
print(sqrt(a**2 + b**2 - a * b * cos(C) * 2) + a + b)
print(b * sin(C))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math


class Triangle(object):
    def __init__(self, a, b, C):
        self.a = a
        self.b = b
        self.C = C * math.pi / 180

    def getHeight(self):
        return self.b * math.sin(self.C)

    def getArea(self):
        return (self.a * self.getHeight()) / 2
    
    def getPerimeter(self):
        return self.a + self.b + math.sqrt(self.a ** 2 + self.b ** 2 - 2 * self.a * self.b * math.cos(self.C))


a = [int(e) for e in input().split()]
tri = Triangle(a[0], a[1], a[2])
print(tri.getArea())
print(tri.getPerimeter())
print(tri.getHeight())

Submission status: Accepted

Solution code:
import math

if __name__ == '__main__':
	a,b,C = map(float,input().split())
	c = (a**2 + b**2 -2*a*b*math.cos(math.radians(C)))**0.5
	s = (a+b+c)/2
	S = (s*(s-a)*(s-b)*(s-c))**0.5
	L = a + b + c
	h = (S*2)/a
	print(S)
	print(L)
	print(h)

Submission status: Accepted

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

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

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

h = b * math.sin(C/180*math.pi)
print (h)

Submission status: Accepted

Solution code:
a,b,c = [x for x in input().split(" ")]

import math
a = float(a)
b = float(b)
c = int(c)
pi =math.pi
rad = c/360 * 2 * math.pi
S = a * b * math.sin(rad) * 0.5
L = a + b + (a*a + b * b - 2 * a * b * math.cos(rad))**(0.5)
h = b * math.sin(rad)
print("{:.9} {:.9} {:.9}".format(S,L,h))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math
a, b, C = map(float, 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)))**0.5))
print('{:.5f}'.format(b*math.sin(math.radians(C))))

Submission status: Accepted

Solution code:
import math as m
a,b,C = map(int,input().split())
r = m.radians(C)
print(f'{a*b*m.sin(r)/2:.5f}')
print(f'{a+b+m.sqrt(a**2+b**2-2*a*b*m.cos(r)):.5f}')
print(f'{b*m.sin(r):.5f}')

Submission status: Accepted

Solution code:
from math import *
a,b,C=map(float,input().split())
C=radians(C)
print(sin(C)*a*b/2,(a*a+b*b-2*a*b*cos(C))**0.5+a+b,sin(C)*b,sep='\n')

Submission status: Accepted

Solution code:
import math

x = input()
list = x.split()
list_i =[float(s) for s in list]

a = list_i[0]
b = list_i[1]
theta = list_i[2]

sintheta = math.sin(math.radians(theta))
costheta = math.cos(math.radians(theta))

S = 0.5 * a * b * sintheta
h = b * sintheta
l = a ** 2 + b ** 2 - 2 * a * b * costheta
l2 = l ** 0.5
L = a + b + l2

S = str(S)
L = str(L)
h = str(h)

k = " "
ans = S + k + L + k + h
print(ans)

Submission status: Accepted

Solution code:
import math

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

rad = degree * math.pi / 180.0

Square = a * b / 2 * math.sin(rad)

c = b / math.sin(rad)

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

h = b * math.sin(rad)

print("%.6f"%Square)
print("%.6f"%L)
print("%.6f"%h)

Submission status: Accepted

Solution code:
import math
nums = list(map(float, input().split()))
h = nums[1] * math.sin(nums[2] * math.pi / 180)
s = nums[0] * h / 2
c = math.sqrt(nums[0]**2 + nums[1]**2 - 2 * nums[0] * nums[1] * math.cos(nums[2] * math.pi / 180))
l = c + nums[0] + nums[1]
print(s, l, h, sep = '\n')

Submission status: Accepted

Solution code:
import math
a,b,C = map(float,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

h = S*2/a

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

Submission status: Accepted

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

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

#aを底辺とした時の高さh
h = b * sinC

#三角形の面積S
S = a * h * 0.5

#週の長さ
c = (a**2+b**2-(2*a*b*cosC))**0.5
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 = 0
S = 1/2*a*b*math.sin(math.radians(C))
print('{0:5f}'.format(S))
print('{0:5f}'.format(a+b+(math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(C))))))
print('{0:5f}'.format(S*2/a))

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

Submission status: Accepted

Solution code:
import math

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

deg = deg*pi/180
cosdeg = math.cos(deg)
sindeg = math.sin(deg)

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

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

Submission status: Accepted

Solution code:
import math

A,B,degree=map(int,input().split())
C=math.sqrt(A*A+B*B-2*A*B*math.cos(math.radians(degree)))
S=A*B*math.sin(math.radians(degree))/2
h=S*2/A
print(S)
print(A+B+C)
print(h)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

Solution code:
import math
a, b, C =[float(_) for _ in input().split()]
c = math.sqrt(math.pow(a,2)+math.pow(b,2)-2*a*b*math.cos(math.radians(C)))
L = a + b + c
h = b * math.sin(math.radians(C))
S = a * h / 2
print("%f\n%f\n%f" % (S,L,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 = (a * b * math.sin(C)) * 0.5
h = b * math.sin(C)
print(S, a + b + c, h, sep = '\n')

Submission status: Accepted

Solution code:
import math

a, b, c = [float(i) for i in input().split()]

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

q = math.sqrt(pow(a,2) + pow(b,2) - 2 * a * b * math.cos(c))

l = a + b + q

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

Submission status: Accepted

Solution code:
import math
PI = 4.0 * math.atan(1.0)

a, b, c = map(int, input().split())
angle = c*PI / 180.0

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

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

Submission status: Accepted

Solution code:
import math
inData = [float(i) for i in input().split()]
a = inData[0]
b = inData[1]
C = math.radians(inData[2])
S = a * b * math.sin(C) / 2
c = pow(a**2 + b**2 - 2 * a * b * math.cos(C),1/2)
L = a + b + c
h = 2 * S /a
print(S)
print(L)
print(h)

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
from math import cos, pi, sqrt


a, b, r = map(int, input().split())
c = sqrt(a**2 + b**2 - 2 * a * b * cos(pi*(r/180)))

l = round(a+b+c, 10)
s = round(l/2, 10)
S = round(sqrt(s * (s-a) * (s-b) * (s-c)), 10)
h = round(S / a * 2, 10)

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