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(float, input().split())
cc = math.radians(c)
h = b * math.sin(cc)
S = a * h / 2
L = a + b + math.sqrt(h**2 + (a-b*math.cos(cc))**2)
print("{0:.10f}\n{1:.10f}\n{2:.10f}\n".format(S, L, 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 + 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, deg = map(float, raw_input().split(" "))

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

print(str(S) + " " + str(L) + " " + str(h))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

a, b, C = map(int, raw_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)))
L = a+b+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)
S = (1/2) * a * b * math.sin(c)

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

H = (2 * S) / a

print(S,L,H)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8
import math

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

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

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

print('%.6f'%S)
print('%.6f'%L)
print('%.6f'%h)

Submission status: Accepted

Solution code:
import math

[a, b, C] = [float(x) for x in raw_input().split()]
C = math.radians(C)
c = math.sqrt(a ** 2.0 + b ** 2.0 - 2.0 * a * b * math.cos(C))
L = a + b + c
S = 0.5 * a * b * math.sin(C)
h = S / a * 2.0

print S, L, h

Submission status: Accepted

Solution code:
def calc_triangle(a, b, C):
    from math import sqrt, sin, cos, tan, radians
    c = sqrt(a**2 + b**2 - (2*a*b*cos(radians(C))))
    L = a + b + c
    S = 0.5 * a * b * sin(radians(C))
    h = b * sin(radians(C))
    return S, L, h


if __name__ == '__main__':
    # ??????????????\???
    data = [int(x) for x in input().split(' ')]
    a = data[0]
    b = data[1]
    C = data[2]

    # ????§???¢???????¨??????±????¨????
    S, L, h = calc_triangle(a, b, C)

    # ???????????????
    print('{0:.8f}\n{1:.8f}\n{2:.8f}'.format(S, L, h))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import math

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

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

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

Submission status: Accepted

Solution code:
import math

a, b, C = [float(_) for _ in input().split()]

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

Submission status: Accepted

Solution code:
import math
a,b,C = map(float, input().split())
C = math.radians(C)
h = b * math.sin(C)
S = a * h * .5
L = a + b + math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(C))
print("{0:.6f}\n{1:.6f}\n{2:.6f}".format(S,L,h))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

a, b, C = [int(i) for i in 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(S)
print(L)
print(h)

Submission status: Accepted

Solution code:
import math

I = (raw_input()).split(" ")
a = int(I[0])*1.0
b = int(I[1])*1.0
C = (int(I[2])*math.pi)/180

print (1.0/2)*a*b*math.sin(C)
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 = [int(i) for i in 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 = map(float,input().split())
S = 0.5*a*b*math.sin(c*math.pi/180)
L = a+b+(a*a+b*b-2*a*b*math.cos(c*math.pi/180))**0.5
print(S,L,b*math.sin(c*math.pi/180))

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())
h = b * sin(pi*C/180)
S = a  * h * 1/2
L = sqrt(a**2+b**2-2*a*b*cos(pi*C/180)) + a + b
print(S)
print(L)
print(h)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

S = a * b * math.sin(Cr) * 0.5

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

c = math.sqrt(c2)

L = 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())
t = math.radians(C)
S = 0.5*a*b*math.sin(t)
L = a + b + math.sqrt((a**2)+(b**2)-(2*a*b*math.cos(t)))
h = b*math.sin(t)
print("{:.5f}\n{:.5f}\n{:.5f}".format(S,L,h))

Submission status: Accepted

Solution code:
from math import *
a,b,C=map(int,raw_input().split())
C = radians(C)

print (0.5)*a*b*sin(C)
print sqrt(a**2+b**2-2*a*b*cos(C)) + a + b
h = b*sin(C)
print h

Submission status: Accepted

Solution code:
import math

len_a, len_b, deg_C = map(int,input().split(" "))
rad_C = math.radians(deg_C)

#area
S = (1/2) * len_a * len_b * math.sin(rad_C)
#Length
L = len_a + len_b + math.sqrt(len_a ** 2 + len_b ** 2 - 2 * len_a * len_b * math.cos(rad_C))
#height
h = len_b * math.sin(rad_C)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

sin_c = math.sin(c_deg*math.pi/180)
cos_c = math.cos(c_deg*math.pi/180)

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

print(s)
print(a+b+c)
print(s/a*2.0)

Submission status: Accepted

Solution code:
#S, L, h
import math
a, b, C = map(int, input().split())

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

print('%.4f'% S)
print('%.4f'% L)
print('%.4f'% h)

Submission status: Accepted

Solution code:
import math
a, b, c = [float(i) for i in input().split()]
print(a * b * math.sin(math.radians(c)) / 2)
print(a + b + math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(math.radians(c))))
print(b * math.sin(math.radians(c)))

Submission status: Accepted

Solution code:
import math
a, b ,angleC = [float(x) for x in input().split(" ")]

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

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


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

Submission status: Accepted

Solution code:
import math
a,b,C = (float(i) for i in input().split())
rad =math.radians(C)
S = a*b*0.5*math.sin(rad)
L = a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(rad))
H = b*math.sin(rad)
print(S)
print(L)
print(H)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import math
import sys


def calculate_area(side_a, side_b, angle_c):
    return (side_a*side_b*math.sin(math.radians(angle_c))) / 2


def calculate_perimeter(side_a, side_b, angle_c):
    side_c = math.sqrt(side_a**2 + side_b**2
                       - 2*side_a*side_b*math.cos(math.radians(angle_c)))
    return side_a + side_b + side_c


def calculate_height_from_side_a(side_a, area):
    return (area*2)/side_a


def main():
    nums = [float(num) for num in sys.stdin.readline().split()]

    area = calculate_area(nums[0], nums[1], nums[2])
    perimeter = calculate_perimeter(nums[0], nums[1], nums[2])
    height_from_side_a = calculate_height_from_side_a(nums[0], area)

    print(area)
    print(perimeter)
    print(height_from_side_a)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
a, b, C = map(float, input().split())
print('{0:.8f}'.format(0.5*a*b*math.sin(math.radians(C))))
print('{0:.8f}'.format(a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(C)))))
print('{0:.8f}'.format(b*math.sin(math.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
h = 2*s/a
l = a + b + (a**2+b**2 - 2*a*b*math.cos(math.radians(c)))**0.5
print("{0:.5f} {1:.5f} {2:.5f}".format(s,l,h))

Submission status: Accepted

Solution code:
import math

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

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

print(S,L,h)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys
import os
import math


a, b, C = list(map(float, input().split()))
rad = math.radians(C)
S = 1/2 * a * b * math.sin(rad)

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

h = b * math.sin(rad)

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !
import sys
import collections
import math
import unittest


def calculate_triangle_area():
    try:
        [side_a, side_b, deg_C] = [float(value) for value in input().rstrip().split()]
    except:
        __input_error()
    
    area        = (1/2) * side_a * side_b * math.sin(deg_C * math.pi / 180)
    perimeter   = side_a + side_b + math.sqrt(side_a**2 + side_b**2 - 2 * side_a * side_b * math.cos(deg_C * math.pi / 180))
    height      = side_b * math.sin(deg_C * math.pi / 180)
    
    print(area)
    print(perimeter)
    print(height)

def __input_error():
    print("input error")
    return -1

class __TestValueClass(unittest.TestCase):
    def testEqual(self,func,tuples):
        self.testFunction(self.assertEqual,func,tuples)
    
    def testFunction(self,assertfunc,func,tuples):
        #tuples[index] = ([*arguments of func], compared value)
        for item in tuples:
            try:
                if isinstance(item[0], collections.Iterable):
                    assertfunc(func(*item[0]),item[1])
                else:
                    assertfunc(func(item[0]),item[1])
            except Exception as msg:
                swidth = 15
                print("="*50)
                print("-- Assertion Error in '" + func.__name__ + "' --")
                print("arguments".ljust(swidth)+":",item[0])
                print("compared value".ljust(swidth)+":",item[1])
                print("message".ljust(swidth)+":")
                print(msg)
                sys.exit()
        print(func.__name__,": succeeded")
        
#test
if __name__ == "__main__" :

    calculate_triangle_area()
#    test = __TestValueClass()

Submission status: Accepted

Solution code:
from math import sin, cos, radians, sqrt
a, b, C = [float(i) for i in input().split(" ")]
S = a * b * sin(radians(C)) / 2
L = a + b + sqrt( a**2 + b**2 - 2*a*b*( cos(radians(C)) ) )
h = 2 * S / a

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import math

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

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

Submission status: Accepted

Solution code:
#ITP1_10-B Triangle
import math as m
a,b,C = map(float,input().split(" "))
C = m.pi*C/180
h = b*m.sin(C)
print( a*h*0.5 )
print( (a**2+b**2 - 2*a*b*m.cos(C))**0.5 + a + b )
print( h )

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

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

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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
print(S)
d = (a**2 + b**2 - 2 * a * b * math.cos(r))
d = math.sqrt(d)
L = a + b + d
print(L)
h = 2 * S / a
print(h)

Submission status: Accepted

Solution code:
import math
s = input().split(" ")
a = round(float(s[0]),8)
b = round(float(s[1]),8)
c = round(float(s[2]),8)
d = round(math.sqrt(a**2 + b**2 - 2*a*b*(round(math.cos(math.radians(c)),8))),8)
L = a + b + d
S = round(b * a * (round(math.sin(math.radians(c)),8)) / 2, 8)
h = round(S * 2 / a, 8)
print(S)
print(L)
print(h)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


def float_print(v):
    print('{:.5f}'.format(v))


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

float_print(a * b * math.sin(C) / 2)
float_print(a + b + math.sqrt(math.pow(a, 2) + math.pow(b, 2) - 2 * a * b * math.cos(C)))
float_print(b * math.sin(C))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a=[float(i)for i in input().split()]
k=a[2]*math.pi/180
if a[2]>90.0:
    h=math.sin(k)*a[1]
    s=math.cos(k)*a[1]
    L=math.sqrt((a[0]-s)*(a[0]-s)+h*h)+a[0]+a[1]
elif a[2]<90.0:
    h=math.sin(k)*a[1]
    n=math.sqrt(a[1]*a[1]-h*h)
    L=a[0]+a[1]+math.sqrt(h*h+(a[0]-n)*(a[0]-n))
else:
    h=a[1]
    L=math.sqrt(a[0]*a[0]+a[1]*a[1])+a[0]+a[1]
S=a[0]*h/2
print("%.5f"%(S))
print("%.5f"%(L))
print("%.5f"%(h))

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
????§???¢
????§???¢????????? a, b ??¨?????????????§? C ?????????
??????????§???¢?????¢??? S?????¨????????? L, 
a ???????????¨????????¨???????????? h 
????±???????????????°?????????????????????????????????
"""
import math
a, b, C = map(float,input().strip().split())
theta = math.radians(C) # ?????????????????¢??????
h = math.sin(theta) * b
S = a * h / 2
a1 = math.cos(theta) * b
a2 = a - a1
x = math.sqrt((h * h) + (a2 * a2))
L = a + b + x

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

Submission status: Accepted

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

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(S)
print(L)
print(h)

Submission status: Accepted

Solution code:
import math

def main():
    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(s)
    print(l)
    print(h)

main()

Submission status: Accepted

Solution code:
import math

a,b,C= map(float,(input().split()))
Crad=C/180*math.pi

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


L=math.sqrt((a-b*math.cos(Crad))**2+H**2)+a+b
print(S)
print(L)
print(H)

Submission status: Accepted

Solution code:
import math

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

C_radian=math.radians(C)

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

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

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

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

Submission status: Accepted

Solution code:
import math

a,b,C=map(int,input().split())
C2=math.radians(C)
sin=math.sin(C2)
cos=math.cos(C2)
S = 0.5*a*b*sin
L = a+b+(math.sqrt((a**2+b**2)-(2*a*b*cos)))
H = (a*b*sin/2)/(a/2)
print("{0:.8f}".format(S))
print("{0:.8f}".format(L))
print("{0:.8f}".format(H))

Submission status: Accepted

Solution code:
from math import sin, cos, radians

a, b, C = (float(x) for x in input().split())
s = a * b * sin(radians(C)) * 0.5
l = (a **2 + b**2 - 2 * a * b * cos(radians(C))) ** 0.5 + a + b
h = s * 2 / a
print(s)
print(l)
print(h)

Submission status: Accepted

Solution code:
import math

a, b, C = list(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 = b * math.sin(C)
print("{:.5f}".format(S))
print("{:.5f}".format(l))
print("{:.5f}".format(h))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Aizu Problem ITP_1_10_B: Triangle
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


a, b, C = [int(_) for _ in input().split()]
C *= math.pi / 180
S = a * b * math.sin(C) / 2
c = math.sqrt(a**2 - 2 * a * b * math.cos(C) + b**2)
L = a + b + c
h = 2 * S / a
print("%.8f\n%.8f\n%.8f" % (S, L, h))

Submission status: Accepted

Solution code:
import math
from math import cos, sin

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

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

Submission status: Accepted

Solution code:
import math

a, b, C = map(float, raw_input().split())
print a * b * math.sin(math.radians(C)) / 2
print a + b + math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(C)))
print (b * math.sin(math.radians(C)))

Submission status: Accepted

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

Submission status: Accepted

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

print("%f" % s)
print("%f" % l)
print("%f" % h)

Submission status: Accepted

Solution code:
import math as m
a, b, c = map(float, input().split())
c = m.radians(c)
S = a * b * m.sin(c) * (1/2)
l = m.sqrt(a**2 + b**2 - 2 * a * b * m.cos(c))
L = a + b + l
h = b * m.sin(c)
print("%.5f\n%.5f\n%.5f" % (S, L, h))

Submission status: Accepted

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

def g(a, b, c):
    c_rad = radians(c)
    yield a * b * sin(c_rad) / 2
    yield a + b + sqrt(a ** 2 + b ** 2 - 2 * a * b * cos(c_rad))
    yield b * sin(c_rad)

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

for i in g(a, b, c):
    print("{:.8f}".format(i))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math as m

a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
c=m.radians(c)
S=0.5*a*b*m.sin(c)
L=a+b+m.sqrt(a*a+b*b-2*a*b*m.cos(c))
H=b*m.sin(c)
print(S)
print(L)
print(H)

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:
import math
a, b, C = map(float, input().split())
print('%f' %(a * b * math.sin(math.pi * C / 180.0) / 2))
print('%f' %(a + b + math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.pi * C / 180.0))))
print(('%f' %(b * math.sin(math.pi * C / 180.0) )))

Submission status: Accepted

Solution code:
import math

input_str = input().split(' ')
a = int(input_str[0])
b = int(input_str[1])
theta = int(input_str[2]) * math.pi / 180
c = math.sqrt(a*a-2*a*b*math.cos(theta)+b*b)

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

print('%.8f'%S)
print('%.8f'%L)
print('%.8f'%h)

Submission status: Accepted

Solution code:
import math

data = map(int, raw_input().split())
a = data[0]
b = data[1]
deg = math.radians(data[2])

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

print S
print L
print h

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from __future__ import division
import math

a, b, C = map(int, raw_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))

for i in S, L, h:
    print "{:.5f}".format(i)

Submission status: Accepted

Solution code:
import math
a,b,C=map(float,input().split())
C*=math.pi/180
print('%.8f'%(a*b*math.sin(C)/2))
print('%.8f'%(a+b+(a*a+b*b-2*a*b*math.cos(C))**.5))
print('%.8f'%(b*math.sin(C)))

Submission status: Accepted

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

C_rad = C * math.pi / 180.0

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

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

Submission status: Accepted

Solution code:
import math

a,b,c = [float(s) for s in input().split()]
r = c * math.pi / 180
h = math.sin(r) * b
s = a * h / 2

x1 = a
y1 = 0
if c == 90:
    x2 = 0
else:
    x2 = math.cos(r) * b
y2 = h

d = math.sqrt((math.fabs(x1 - x2) ** 2) + (math.fabs(y1 - y2) ** 2))
l = a + b + d

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

Submission status: Accepted

Solution code:
from math import sin, cos, sqrt, radians
a, b, C = map(int, input().split())
C = radians(C)
S = .5 * a * b * sin(C)
h = b * sin(C)
c = sqrt(a ** 2 + b ** 2 - 2 * a * b * 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())
C_rad = C / 180 * math.pi
 
H = b * math.sin(C_rad)
S = H * a / 2 
L = math.sqrt( (a-b*math.cos(C_rad)) **2 + H**2 ) + a + b

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

Submission status: Accepted

Solution code:
# -*-coding:utf-8

import math

def main():

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

    radian = math.radians(degree)

    S = 0.5*a*b*math.sin(radian)
    x = a + b + math.sqrt(pow(a,2)+pow(b,2)-2*a*b*math.cos(radian))
    print('%.8f' % S)
    print('%.8f' % x)
    print('%.8f' % ((2*S)/a))



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from math import sin, cos, sqrt, pi
side_a, side_b, angle = map(int, input().split())                                                                      
angle = angle * pi / 180
side_c = sqrt(side_b**2 + side_a**2 - 2 * side_a * side_b * cos(angle))
area = 0.5 * side_a * side_b * sin(angle)
circum = side_a + side_b + side_c
height = side_b * sin(angle)
print(area, circum, height)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


def main():
    """
       /|
    b / | h
     /  |
    /??????|???_
    <- a -->

    ??????a, ??????b, a??¨b??????????§?C(???)
    C???????????????radian????±???????

    ??????1????????????: x
    ??????: h (b?????????????????¨????????????sin????????¨???????±???????
    ??¢???: S (??????)

    L (x + a + b): ??????????????????????????¨??????
    x = sqrt(a_ ** 2 + h ** 2)
    ??????a??????????????????h?????§???????????? a_ ??¨????????¨
    a_ = a - b * cos(rad)
    ??? ??????????????¨?????????????????? ??§??°??°??£??????????????????
    """
    a, b, C = map(int, input().split())

    # ????§???¢????????? 0 < C < 180
    rad = math.pi * C / 180
    sin = math.sin(rad)
    h = b * sin
    S = a * h / 2

    a_ = a - b * math.cos(rad)
    len_d = math.sqrt(a_ ** 2 + h ** 2)

    print("{:.8f}".format(S))
    print("{:.8f}".format(a + b + len_d))
    print("{:.8f}".format(h))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
line = input().split()
a = int(line[0])
b = int(line[1])
c = int(line[2])
degree = c
rad = math.radians(degree)
s = a * b * math.sin(rad) / 2
l = a + b + math.sqrt(pow(a,2) + pow(b,2) - 2 * a * b * math.cos(rad))
h = b * math.sin(rad)
print("{0:.8f}".format(s))
print("{0:.8f}".format(l))
print("{0:.8f}".format(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

a1 = b * math.cos(math.radians(C))
cc = math.sqrt(h * h + (a - a1) * (a - a1))

print("{a:5f}".format(a=S))
print("{a:5f}".format(a=a + b + cc))
print("{a:5f}".format(a=h))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(float,input().split())
import math
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('{0:.8f}'.format(S))
print('{0:.8f}'.format(L))
print('{0:.8f}'.format(h))