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: Wrong Answer

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

h = 0
if c >= 90:
	h = (180 - c) * b / 90
else:
	h = c * b / 90

S = a * h / 2

x1 = a
y1 = 0
x2 = math.sqrt(b**2 - h**2)
if c > 90:
	x2 *= -1
y2 = h
x = math.fabs(x2 - x1)
y = math.fabs(y2 - y1)
d = math.sqrt(x**2 + y**2)
L = a + b + d

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

for i in (s, a+b+d, h):
    print(round(i))

Submission status: Wrong Answer

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

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

for i in (s, a+b+d, h):
    print(i)

Submission status: Wrong Answer

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/(1/2)*a
print(f"{S} {L} {h}")

Submission status: Wrong Answer

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/(1/2)*a
fn = lambda x: '{:10f}'.format(x)
print(f"{fn(S)} {fn(L)} {fn(h)}")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a, b, C = map(int, input().split())
C = radians(C)
S = a * b * sin(C) * 0.5
h = 2.0 * S // a
c = sqrt(a ** 2 + b ** 2 - 2 * a * b * cos(C))
L = a + b + c
print("{:.5}".format(S))
print("{:.5}".format(L))
print("{:.5}".format(h))

Submission status: Wrong Answer

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

a, b, C = map(float, input().split())
C = radians(C)
S = a * b * sin(C) * 0.5
h = 2.0 * S // a
c = sqrt(a ** 2 + b ** 2 - 2 * a * b * cos(C))
L = a + b + c
print("{:.5f}".format(S))
print("{:.5f}".format(L))
print("{:.5f}".format(h))

Submission status: Wrong Answer

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

a, b, C = map(float, input().split())
C = radians(C)
S = a * b * sin(C) * 0.5
h = 2.0 * S // a
c = sqrt(a ** 2 + b ** 2 - 2 * a * b * cos(C))
L = a + b + c
print("{:.6f}".format(S))
print("{:.6f}".format(L))
print("{:.6f}".format(h))

Submission status: Wrong Answer

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

a, b, C = map(float, input().split())
C = radians(C)
S = a * b * sin(C) * 0.5
h = 2.0 * S // a
c = sqrt(a ** 2 + b ** 2 - 2 * a * b * cos(C))
L = a + b + c
print("{:.10f}".format(S))
print("{:.10f}".format(L))
print("{:.10f}".format(h))

Submission status: Wrong Answer

Solution code:
import sys
import math

for line in sys.stdin:
    if len(line)>1:
        a, b, c = line.strip('\n').split()
        a, b, c = int(a), int(b), int(c)
        print a * b * math.sin(math.radians(c))

Submission status: Wrong Answer

Solution code:
import math
e=map(float,raw_input().split())
a=e[0]
b=e[1]
C=math.radians(e[2])
c=(a**2+b**2-2*a*b*math.cos(C))**0.5
if a<b:
        h=a*math.sin(C)
        S=h*b*0.5
elif b<a:
        h=b*math.sin(C)
        S=h*a*0.5
L=a+b+c
print S
print L
print h

Submission status: Wrong Answer

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

(n,m,o) = map(float, raw_input().split())
s=(n+m+o)/2.0
c=math.radians(o)
cs=math.sqrt(n**2+m**2+n+m*math.cos(c))
h=m*math.sin(o)
#ans=(s*(s-m)*(s-n)*(s-o))**0.5
#print ((n-o)**2 + (m-p)**2)**0.5
#print ans
S=h*n/2
L=n+m+h
print S
print L
print h

Submission status: Wrong Answer

Solution code:
import math
a, b, c = map(float, raw_input().split())
h = b * math.sin(math.pi*c/180)
s = a * h / 2
x = math.sqrt(h**2 + (a-b*math.sin(math.pi*(90-c)/180))**2) 
l = a + b + x
print "%.8f, %.8f, %.8f" % (s, l, h)

Submission status: Wrong Answer

Solution code:
import math
a, b, c = map(float, raw_input().split())
h = b * math.sin(math.pi*c/180)
s = a * h / 2
x = math.sqrt(h**2 + (a-b*math.sin(math.pi*(90-c)/180))**2) 
l = a + b + x
#print "%.8f, %.8f, %.8f" % (s, l, h)
print "%.1f, %.1f, %.1f" % (s, l, h)

Submission status: Wrong Answer

Solution code:
import math

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

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: Wrong Answer

Solution code:
import math

a, b, c = map(float, raw_input().split())
c = c/360*math.pi

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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)

Submission status: Accepted

Solution code:
#!/usr/bin/env 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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,deg = map(float,input().split())
rad = math.radians(deg)
S = a * b * math.sin(rad) / 2
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
#1_10_B 2015.4.14

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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*a+b*b-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())

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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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  # Area
print a + b + c             # Periphery
print b * sinC              # Height

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
#coding: UTF-8
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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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