Problem:
Triangle For given two sides of a triangle a and b and the angle C between them, calculate the following properties:  S : Area of the triangle  L : The length of the circumference of the triangle  h : The height of the triangle with side a as a bottom edge  Input The length of a , the length of b and the angle C are given in integers. Output Print S , L and h in a line respectively. The output should not contain an absolute error greater than 10 -4 . Sample Input 4 3 90 Sample Output 6.00000000
12.00000000
3.00000000

Solution (Python):
import math
def main():

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

if __name__ == '__main__':
    main()

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

Solution (Python):
import math


def main():
    a, b, c = map(int, input().split())
    angle = math.radians(c)
    s = (1/2) * math.sin(angle) * a * b
    L = a + b + (a**2 + b**2 - 2*a*b*math.cos(angle))**(1/2)
    h = math.sin(angle) * b
    print('{0:.5f}\n{1:.5f}\n{2:.5f}'.format(s, L, h))


if __name__ == '__main__':
    main()

Solution (Python):
import math

def main():
    a, b, ang_ab = [float(x) for x in input().split()]

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

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

    print("{:f} {:f} {:f}".format(s, l, h))

if __name__ == '__main__':
    main()

Solution (Python):
import math
a, b, deg = map(float, input().split())
rad = math.radians(deg)
area = 0.5 * a * b * math.sin(rad)
c = math.sqrt(a*a + b*b - 2*a*b*math.cos(rad))
h = area*2 / a;

print(area, a+b+c, h)

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

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

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

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

Solution (Python):
import math
lst=input().split()
lst=list(map(lambda i:int(i),lst))
a,b,C=lst[0],lst[1],lst[2]
S=(1/2)*a*b*math.sin(math.radians(C))
h=(2/a)*S
c=(a**2+b**2-2*a*b*math.cos(math.radians(C)))**(1/2)
L=a+b+c
print(S)
print(L)
print(h)

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

Solution (Python):
import math

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

b_y = b * math.sin(math.radians(c))
b_x= b * math.cos(math.radians(c))

Area = a * b_y / 2
Area = round(Area,8)

a_x = a
a_y = 0.0

x_dis = abs(a_x - b_x)
y_dis = abs(a_y - b_y)

dis = math.sqrt(x_dis**2 + y_dis**2)

Length = round(dis,8) + a + b

Tall = b_y

print(Area)
print(Length)
print(Tall)

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

Solution (Python):
from sys import stdin
from math import sin, cos, pi, sqrt

a, b, C = [float(x) for x in stdin.readline().rstrip().split()]
S = a*b*sin(C*pi/180)/2
c = sqrt(a**2 + b**2 - 2*a*b*cos(C*pi/180))
L = a+b+c
h = 2*S/a
print(*[S, L, h], sep = "\n")

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

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

Solution (Python):



import math

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

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

Solution (Python):


import math

if __name__ == '__main__':
    a, b, C = map(float, raw_input().split())
    S = a * b * math.sin(C*math.pi/180) / 2
    L = a + b + math.sqrt(a**2 + b**2 - 2*a*b*math.cos(C*math.pi/180))
    h = b * math.sin(C*math.pi/180)

    print '{}\n{}\n{}'.format(S, L, h)

Solution (Python):
import math

a, b, c = map(float,input().split())
e = b*math.sin(math.radians(c))
print(a*e/2)
print(((a-b*math.cos(math.radians(c)))**2+e**2)**0.5+a+b)
print(e)

Solution (Python):

import math

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

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

Solution (Python):
import math
n=list(map(int,input().split()))

a=n[0]
b=n[1]
c=n[2]*(math.pi/180)

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

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

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

Solution (Python):
import math

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

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


cosdeg = math.cos(math.radians(deg))
z = a*a + b*b - 2*a*b*cosdeg
L = a + b + math.sqrt(z)

h = b*sindeg

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

Solution (Python):

import math

A, B, DEGREE = list(map(int, input().split()))
RADIAN = math.radians(DEGREE)

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

print("%.10f %.10f %.10f"%(S, A+B+C, H))

Solution (Python):
import math

class Triangle():

    def __init__(self, edge1, edge2, angle):
        self.edge1 = edge1
        self.edge2 = edge2
        self.angle = angle
        self.edge3 = math.sqrt(edge1 ** 2 + edge2 ** 2 - 2 * edge1 * edge2 * math.cos(math.radians(angle)))
        self.height = edge2 * math.sin(math.radians(angle))
        self.area = edge1 * self.height / 2

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

triangle = Triangle(a, b, theta)

print(triangle.area)
print(triangle.edge1 + triangle.edge2 + triangle.edge3)
print(triangle.height)

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

class Triangle (object):
    def __init__(self, a, b, C):
        self.a = a
        self.b = b
        self.C = radians(C)

    def getArea(self):
        return self.a * self.getHeight() / 2

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

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

tri = Triangle(*[int(e) for e in input().split()])
print(tri.getArea())
print(tri.getPerimeter())
print(tri.getHeight())

Solution (Python):
import math
class Triangle(object):
    def __init__(self, a, b, C):
        self.a = a
        self.b = b
        self.C = math.radians(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)))
    
    def getHeight(self):
        return(self.b * math.sin(self.C))

tri = Triangle(*[int(i) for i in input().split()])
print(tri.getArea())
print(tri.getPerimeter())
print(tri.getHeight())

Solution (Python):
from math import *
a,b,c = map(int,input().split())
c = radians(c)
S = a*b*sin(c)/2
print("%.10f %.10f %.10f" %(S,a+b+sqrt(a*a+b*b-2*a*b*cos(c)),2*S/a ))

Solution (Python):
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(f"{S:.8f}")
print(f"{L:.8f}")
print(F"{h:.8f}")

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

Solution (Python):
import math
a, b, C = map(int, raw_input().split())
S = 0.5 * a * b * math.sin(math.radians(C))
c = math.sqrt(a * a + b * b - 2 * a * b * math.cos(math.radians(C)))
print("%8f" %(S))
print("%8f" %(a + b + c))
print("%8f" %(S / a * 2))

Solution (Python):
import math

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

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

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

Solution (Python):
import math
a,b,c=map(float,raw_input().split())
c = c / 180 * math.pi

print "%.10f" % float(a*b*math.sin(c)/2)
x = math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(c))
print "%.10f" % float(a + b + x)
print "%.10f" % float(b*math.sin(c))

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

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

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

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

Solution (Python):
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('{0:.4f}\n{1:.4f}\n{2:.4f}'.format(S,L,h))

Solution (Python):
import math

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

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

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

Solution (Python):
import math
(a, b, C) = [float(i) for i in input().split()]
S = 0.5 * a * b * math.sin(math.radians(C))
c = math.sqrt(a * a + b * b - 2 * a * b * math.cos(math.radians(C)))
print("%8f" %(S))
print("%8f" %(a + b + c))
print("%8f" %(S / a * 2))

Solution (Python):
import math

(a, b, C) = [float(i) for i in input().split()]
S = 0.5 * a * b * math.sin(math.radians(C))
c = math.sqrt(a * a + b * b - 2 * a * b * math.cos(math.radians(C)))

print("%8f" %(S))
print("%8f" %(a + b + c))
print("%8f" %(S / a * 2))

Solution (Python):
import math

(a, b, C) = [float(i) for i in input().split()]
S = 0.5 * a * b * math.sin(math.radians(C))
c = math.sqrt(a * a + b * b - 2 * a * b * math.cos(math.radians(C)))

print("%8f" %(S))
print("%8f" %(a + b + c))
print("%8f" %(S / a * 2))

Solution (Python):
import math

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

cs = math.radians(C)

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

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

[print(format(i, '6f')) for i in [S, L, h]]

Solution (Python):
import math
(a, b, C) = [int(i) for i in input().split()]
radC = math.radians(C)
h = b * math.sin(radC)
S = (a * h) / 2
L = a + b + math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(radC))
print('{0:.4f}\n{1:.4f}\n{2:.4f}'.format(S,L,h))

Solution (Python):
import sys
import math
(a, b, C) = [float(i) for i in sys.stdin.readline().split()]
C = C * 2 * math.pi / 360
S = a * b * math.sin(C) / 2
c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(C))
L = a + b + c
h = 2 * S / a
print(S)
print(L)
print(h)

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

print S
print L
print h

Solution (Python):
import math

if __name__ == '__main__':
    a, b, C = [int(i) for i in input().split()]
    theta = math.radians(C)
    S = a * b * math.sin(theta) / 2
    c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(theta))
    L = a + b + c
    h = b * math.sin(theta)
    [print("{0:.5f}".format(i)) for i in [S, L, h]]

Solution (Python):


import math

a,b,C = list(map(int,input().split()))
rad = math.pi * C / 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 = S * 2 / a
print('{:.10f}\n{:.10f}\n{:.10f}'.format(S,L,h))

Solution (Python):


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

Solution (Python):



import math

a,b,C = map(int,input().split())
C = math.radians(C)
h = b * math.sin(C)
S = a * h / 2
L = a + b + math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(C))
print('{:.10f}\n{:.10f}\n{:.10f}'.format(S,L,h))

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

Solution (Python):
import math

a, b, degC = [ float( i ) for i in raw_input( ).split( " " ) ]
radC = degC*math.pi/ 180.0
h = math.sin( radC ) * b
S = (a*h)/2
x = math.cos( radC ) * b
x -= a
c = math.sqrt(  x**2 + h**2  ) 
L = a + b + c

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

Solution (Python):
import math

a, b, degC = [ float( i ) for i in input( ).split( " " ) ]
radC = degC*math.pi/ 180.0
h = math.sin( radC ) * b
S = (a*h)/2
x = math.cos( radC ) * b
x -= a
c = math.sqrt(  x**2 + h**2  ) 
L = a + b + c

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

Solution (Python):
import math

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

Solution (Python):

from math import sin, pi, sqrt, cos


def main():
    a, b, CinDeg = map(int, raw_input().split())
    CinRad = pi * CinDeg / 180
    S = 0.5 * a * b * sin(CinRad)
    c = sqrt(a ** 2 + b ** 2 - 2 * a * b * cos(CinRad))
    L = a + b + c
    h = S / (0.5 * a)
    print S
    print L
    print h

if __name__ == '__main__':
    main()

Solution (Python):
import math

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

print('%.7f\n%.7f\n%.7f\n' % (S, L, h))

Solution (Python):
import math

input = map(float, raw_input().split(" "))
a = input[0]
b = input[1]
c = math.radians(input[2])

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

print "{0:.5f}".format(s)
print "{0:.5f}".format(l)
print "{0:.5f}".format(h)

Solution (Python):
import math
a,b,c = map(float,raw_input().split())
print "%.8f" %float(a*b*math.sin(math.radians(c))/2)
print "%.8f" %float(a+b+math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(c))))
print "%.8f" %float(b*math.sin(math.radians(c)))

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

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

Solution (Python):
import math
a, b, c = map(int, raw_input().split())
radius = c / 180.0 * math.pi
h = b * math.sin(radius)
print (a * h) / 2.0
print a + b + math.sqrt(a**2 + b**2 - 2*a*b*math.cos(radius))
print h

Solution (Python):
import math

a,b,c = map(int,raw_input().split())
c = math.radians(c)
s = (a*b*math.sin(c))/2
h = b*math.sin(c)
L = a+b+math.sqrt(math.pow(a,2)+math.pow(b,2)-2*a*b*math.cos(c))
print(s)
print(L)
print(h)

Solution (Python):
import math

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

C = math.radians(C)

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

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

L = a + b + c

h = 2 * S / a

print("{0}\n{1}\n{2}".format(S, L, h))

Solution (Python):
import math
in_line = raw_input().split()
a = float(in_line[0])
b = float(in_line[1])
c = float(in_line[2])
print 0.5*a*b*math.sin(math.radians(c))
print a+b+math.sqrt(a*a+b*b-2*a*b*math.cos(math.radians(c)))
print b*math.sin(math.radians(c))

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

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

Solution (Python):
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*a+b*b-2*a*b*math.cos(C)))
print(b*math.sin(C))

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

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

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



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

Solution (Python):
import math

a, b, c = [int(i) for i in 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 = 2 * s / a
print(s)
print(l)
print(h)

Solution (Python):
import math

a, b, C = map(int, raw_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))) + a + b
h = 2*S/a

print S
print L
print h

Solution (Python):
import math
a,b,c=map(int,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("%.6f %.6f %.6f"%(s,l,h))

Solution (Python):
from math import *
a, b, C = (int(i) for i in input().split())
C = pi * C / 180
c = sqrt(a**2 + b**2 - 2 * a * b * cos(C))

h = b * sin(C)
S = a * h / 2
L = a + b + c
print("{:.8f} {:.8f} {:.8f}".format(S, L, h))

Solution (Python):


import math

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

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

Solution (Python):
import math
data = map(float, raw_input().split(" "))

rad = data[2]*math.pi/180

h = data[1]*math.sin(rad)
s = data[0]*h/2
l = data[0]+data[1]+math.sqrt((data[0]-data[1]*math.cos(rad))**2+h**2)

print "%f\n%f\n%f" % (s,l,h)

Solution (Python):
import math

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

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

Solution (Python):
import math
def toRad(theta):
    return theta * math.pi / 180
def calc_S(_a, _b, _c):
    return (_a * _b * math.sin(toRad(_c))) / 2
def calc_L(_a, _b, _c):
    return _a + _b + math.sqrt(_a**2 + _b**2 - 2*a*b*math.cos(toRad(_c)))
def calc_H(_a, _b, _c):
    return _b * math.sin(toRad(_c))

a, b, c = map(int, input().split())
print(calc_S(a, b, c))
print(calc_L(a, b, c))
print(calc_H(a, b, c))

Solution (Python):
import math
a, b, C = map(int, raw_input().split())
S = (a * b * math.sin(math.radians(C))) / 2
c = math.sqrt(a*a + b*b - 2*a*b*math.cos(math.radians(C)))
print("%f" % (S))
print("%f" % ( a + b + c))
print("%f" % ((S * 2) / a))

Solution (Python):
import math

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

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

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

Solution (Python):
import math

a, b, t = map(int, input().strip().split())

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

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

Solution (Python):
import math
a,b,c=map(float,input().split())
h=b*math.sin(c/180.0*math.pi)
ad=a-b*math.cos(c/180.0*math.pi)
d=(h*h+ad*ad)**0.5
l = a + b + d
s = a * h / 2.0
print('{0:.6f}'.format(s))
print('{0:.6f}'.format(l))
print('{0:.6f}'.format(h))

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

Solution (Python):
import sys
import math

def str_input():
    S = raw_input()
    if S[len(S)-1] == "\r":
        return S[:len(S)-1]
    return S

def float_to_str(num):
    return str("{:.10f}".format(num))

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

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

dx = a - b * math.cos(math.radians(C))
dy = h

L = a + b + math.sqrt(dx*dx + dy*dy)

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

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

Solution (Python):
from math import sin,cos,sqrt,pi
a,b,C=map(float,raw_input().split(" "))
C*=pi/180

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

L=a+b+c

S=0.5*a*b*sin(C)

h=2*S/a

print S
print L
print h

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

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

Solution (Python):
import math

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

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

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

Solution (Python):


import sys
import math

i= sys.stdin.readline()

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

d = math.cos(math.radians(c))
c = math.sin(math.radians(c))

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

print S,L,h

Solution (Python):
import math
import sys

a, b, C = [int(x) for x in sys.stdin.readline().split()]
C = math.radians(C)
l = a + b + math.sqrt(a * a + b * b - 2 * a * b * math.cos(C))
h = b * math.sin(C)
s = a * h / 2
print(s)
print(l)
print(h)

Solution (Python):
import math

a, b, C = [int(x) for x in input().split()]
C = math.radians(C)
l = a + b + math.sqrt(a * a + b * b - 2 * a * b * math.cos(C))
h = b * math.sin(C)
s = a * h / 2
print(s)
print(l)
print(h)

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

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

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

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

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

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

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

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

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

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

Solution (Python):

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)

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

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

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

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

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

Solution (Python):

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
from math import sin,cos,radians
a,b,c=map(int,input().split())
c=radians(c)
s=a*b*sin(c)*0.5
for i in[s,a+b+(a*a+b*b-2*a*b*cos(c))**0.5,s/a*2]:print('%5f'%i)

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

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

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

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

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

Solution (Python):
import math

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


S = (1/2) * len_a * len_b * math.sin(rad_C)

L = len_a + len_b + math.sqrt(len_a ** 2 + len_b ** 2 - 2 * len_a * len_b * math.cos(rad_C))

h = len_b * math.sin(rad_C)

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

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