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(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))**.5,2*S/a,sep='\n')

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
def hoge(a):
    return a*a
    
a, b, angle = map(float, input().split())
angle = math.radians(angle)
print (a*b*math.sin(angle) / 2)
print (a+b+math.sqrt(hoge(a) + hoge(b) - 2*a*b*math.cos(angle)))
print(a*b*math.sin(angle)/a)

Submission status: Accepted

Solution code:
# coding:utf-8
import math
array = map(int, raw_input().split())
a = array[0]
b = array[1]
C = array[2]
rad = math.radians(C)
S = a * b * math.sin(rad) / 2.0
L = a + b + math.sqrt(math.pow(a,2) + math.pow(b,2) - 2 * a * b * math.cos(rad))
h = b * math.sin(rad)
print S
print L
print h

Submission status: Accepted

Solution code:
import math
data = list(map(float, input().split()))
a, b, theta = data[0], data[1], data[2]/180*math.pi
data[1] = (a**2+b**2-2*a*b*math.cos(theta)) ** 0.5 + a + b
data[2] = b * math.sin(theta)
data[0] = a * data[2] / 2
for i in range(3):
    print(data[i])

Submission status: Accepted

Solution code:
from math import sin, cos, radians
a, b, ang = map(int, input().split())
ang = radians(ang)
area = a * b * sin(ang) / 2
c = (a ** 2 + b ** 2 - 2 * a * b * cos(ang)) ** 0.5
circ = a + b + c
height = area * 2 / a
print("%lf\n%lf\n%lf" % (area, circ, height))

Submission status: Accepted

Solution code:
a,b,c = [int(x) for x in input().split()]
import math
si = math.sin(math.radians(c))
co = math.cos(math.radians(c))
s = a*b*si/2
l = a + b + (a**2 + b**2 - 2*a*b*co)**(1/2)
h = 2*s/a 
print("{:.6f}".format(s))
print("{:.6f}".format(l))
print("{:.6f}".format(h))

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys
import math

a, b, c = map(float, sys.stdin.readline().split())
degree = abs(180-abs(c))*math.pi / 180

height = abs(b * math.sin(degree))
pos_x = b * math.cos(degree) + a
edge_x = (height**2 + pos_x**2) ** 0.5

print(round(a * height / 2, 6))
print(round(a + b + edge_x, 6))
print(round(height, 6))

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:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys
import math

a, b, c = map(float, sys.stdin.readline().split())
radian = c*math.pi / 180

height = abs(b * math.sin(radian))
pos_x = b * math.cos(radian)
edge_x = (height**2 + (pos_x-a)**2) ** 0.5

print(round(a * height / 2, 6))
print(round(a + b + edge_x, 6))
print(round(height, 6))

Submission status: Accepted

Solution code:
# Starting here
#define Pi 3.14159265
import math

def Sin(n):
    return math.sin(n*math.pi/180)

def Cos(n):
    return math.cos(n*math.pi/180)

a,b,ang=map(float,raw_input().split())
A=a*a
B=b*b
area=(0.5*a*b*Sin(ang))
C=A+B-(2*a*b*(Cos(ang)))
c=float(math.sqrt(C))
s=a+b+c
print round(area,5)
print round(s,5)
print round((area*2)/a,5)

Submission status: Accepted

Solution code:
import math

def triangle(a, b, deg):
    result = {}
    rad = math.radians(deg)
    c = math.sqrt(a*a+b*b-(2*a*b*math.cos(rad)))
    s = (a+b+c)/2
    result['area'] = math.sqrt(s*(s-a)*(s-b)*(s-c))
    result['perimeter'] = a+b+c
    result['height'] = result['area'] * 2 / a
    return result

if __name__ == '__main__':
    a, b, deg = map(int, input().split())
    triangle = triangle(a, b, deg)
    print(triangle['area'])
    print(triangle['perimeter'])
    print(triangle['height'])

Submission status: Accepted

Solution code:
import math
alen, blen, cang = map(float, input().split())
h = math.sin(math.radians(cang)) * blen
#print(h)
S = 0.5 * alen * h
if cang < 90.0:
    L = alen + blen + math.sqrt((alen - math.sqrt(blen**2.0 - h**2.0)) ** 2.0 + h**2.0)
else:
    L = alen + blen + math.sqrt((alen + math.sqrt(blen**2.0 - h**2.0)) ** 2.0 + h**2.0)
print(S)
print(L)
print(h)

Submission status: Accepted

Solution code:
import math
a, b, c = map(float, input().split(' '))
c = c / 180 * math.pi
s = a * b * math.sin(c) / 2
l = a + b + pow((pow(a, 2) + pow(b, 2) - 2 * a * b * math.cos(c)), 0.5)
h = b * math.sin(c)
print('{0:.8f}'.format(s) + '\n' + '{0:.8f}'.format(l) + '\n' + '{0:.8f}'.format(h))

Submission status: Accepted

Solution code:
import math


def triangle(a, b, angle):
    """returns (area, circumference, height) of a triangle

    a, b: sides of a trianble
    anble: interior angle of a, b (deg)

    >>> s, l, h = triangle(4, 3, 90)
    >>> print('{:.5f} {:.5f} {:.5f}'.format(s, l, h))
    6.00000 12.00000 3.00000
    >>> s, l, h = triangle(1, 1, 60)
    >>> print('{:.5f} {:.5f} {:.5f}'.format(s, l, h))
    0.43301 3.00000 0.86603
    """
    rad = math.radians(angle)
    h = b * math.sin(rad)
    c = math.sqrt(h**2 + (a - b*math.cos(rad))**2)

    return ((a * h) / 2, a + b + c, h)


def run():
    a, b, C = [int(i) for i in input().split()]
    (area, length, height) = triangle(a, b, C)

    print(area)
    print(length)
    print(height)


if __name__ == '__main__':
    run()

Submission status: Accepted

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

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

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

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

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

Submission status: Accepted

Solution code:
#coding: utf-8
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,c = [int(x) for x in 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 = 2 * s / a
for i in [s,l,h]:
    print('{:.12f}'.format(i))

Submission status: Accepted

Solution code:
import math
a,b,c = map(float,input().split())
rad = math.radians(c)
x = (a**2+b**2-2*a*b*math.cos(rad))**(1/2)
L = a+b+x
S = a*b*math.sin(rad)/2
h = 2*S/a
print("{:.8f}\n{:.8f}\n{:.8f}".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 = b * math.sin(math.radians(C))

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

Submission status: Accepted

Solution code:
import math

a,b,C = tuple(float(n) for n in 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("{:.8f}\n{:.8f}\n{:.8f}".format(S,L,h))

Submission status: Accepted

Solution code:
import math, re

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a, b, c = map(int, input().split())
PI = 3.1415926535897932384
c = math.radians(c)
print('{:.5f}'.format(a * b * math.sin(c) / 2))
A = a - b * math.cos(c)
B = b * math.sin(c)
print('{:.5f}'.format(math.sqrt(A * A + B * B) + a + b))
print('{:.5f}'.format(B))

Submission status: Accepted

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

import math

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

Submission status: Accepted

Solution code:
#! python3
# triangle.py

import math

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

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

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

Submission status: Accepted

Solution code:
from math import pi,sin,cos
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))**.5,2*S/a,sep='\n')

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))**.5,2*S/a,sep='\n')

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))**.5,2*S/a,sep='\n')

Submission status: Accepted

Solution code:
import math

a, b, ca = map(float, input().split())
ca = math.radians(ca)
s = a * b * math.sin(ca) / 2
c = (a ** 2 + b ** 2 - 2 * a * b * math.cos(ca)) ** 0.5
h = b * math.sin(ca)
print("{:.5f}".format(s))
print("{:.5f}".format(a + b + c))
print("{:.5f}".format(h))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
l=input().split()
a=float(l[0])
b=float(l[1])
c=int(l[2])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a, b, C = map(int, input().split())
print('{0:.4f}'.format(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)))
print(L)
print('{0:.4f}'.format(math.sin(math.radians(C)) * b))

Submission status: Accepted

Solution code:
import math

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

c = math.sqrt(a**2 + b**2 - (2 * a * b* math.cos(math.radians(C))))
L = a + b + c # 周の長さ
s = L / 2 # 周の長さの半分
S = math.sqrt(s * (s - a) * (s - b) * (s - c))# 面積
h = (2 * S) / a
print("{}\n{}\n{}".format(S, L, h))

Submission status: Accepted

Solution code:
# AOJ ITP1_10_A

import math

def floatinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = float(a[i])
    return a

def main():
    data = floatinput()
    a = data[0]; b = data[1]; C = data[2]
    S = a * b * 0.5 * math.sin(math.radians(C))
    c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(C)))
    L = a + b + c
    h = b * math.sin(math.radians(C))
    print(S); print(L); print(h)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a, b, C = map(int, input().split())
r = math.radians(C)
l = math.sqrt(a**2+b**2-2*a*b*math.cos(r)) # 残り１辺の長さ
h = b * math.sin(r) # 三角形の高さ
print("{0:.4f} {1:.4f} {2:.4f}".format(a*h/2, a+b+l, 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 = a * b * math.sin(C) / 2
print(f"{S:0.9f}")
print(f"{a+b+c:0.9f}")
print(f"{S*2/a:0.9f}")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import math
a, b, C = map(float, input().split())
S = (1/2)*a*b*math.sin(math.radians(C))
L = a + b + math.sqrt(a**2 + b**2 -2*a*b*math.cos(math.radians(C)))
h = S/((1/2)*a)
fn = lambda x: '{:10f}'.format(x)
print(f"{fn(S)} {fn(L)} {fn(h)}")

Submission status: Accepted

Solution code:
# Triangle

from math import *

triangle = [int(i) for i in input().rstrip().split()]
sides = [triangle[0], triangle[1]]
a = sides[0]
b = sides[1]
angle = triangle[2]

triangleArea = 0.5 * a * b * sin(radians(angle))
print(triangleArea)

otherSideSquare = a ** 2 + b ** 2 - 2 * a * b * cos(radians(angle))
otherSide = otherSideSquare ** 0.5
circumference = a + b + otherSide
print(circumference)

height = triangleArea / 0.5 / a
print(height)

Submission status: Accepted

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.sin(C*rad))
print('{0:.5f}'.format(S))
print('{0:.5f}'.format(L))
print('{0:.5f}'.format(h))

Submission status: Accepted

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

Solution code:
import sys
import math

for line in sys.stdin:
    if len(line)>1:
        a, b, r = line.strip('\n').split()
        a, b, r = float(a), float(b), math.radians(float(r))
        
        h = b * math.sin(r)
        c = (a**2 + b**2 - 2*a*b*math.cos(r))**0.5
        l = a + b + c
        s = a * h / 2
        print s
        print l
        print h

Submission status: Accepted

Solution code:
from math import radians, sin, cos

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from __future__ import division, print_function
from sys import stdin
from math import radians, sin, cos, sqrt
a, b, degree = (float(s) for s in stdin.readline().split())
h = b * sin(radians(degree))
s = a * h / 2.0
L = sqrt(a**2 + b**2 - 2.0*a*b*cos(radians(degree))) + a + b
print('{:.4f}\n{:.4f}\n{:.4f}'.format(s, L, h))

Submission status: Accepted

Solution code:
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-2*n*m*math.cos(c))
h=m*math.sin(c)
#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+cs
print S
print L
print h

Submission status: Accepted

Solution code:
#coding = utf-8
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 "\n".join([str(s), str(l), str(h)])
#print "%.1f, %.1f, %.1f" % (s, l, h)

Submission status: Accepted

Solution code:
import math

a, b, c = map(float, raw_input().split())
c = c/180*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

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

sinc = math.sin(c*math.pi/180)
cosc = math.cos(c*math.pi/180)
c = math.sqrt(a**2+b**2-2*a*b*cosc)
s = a*b*sinc/2.0

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

Submission status: Accepted

Solution code:

import math

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

print(a*b*math.sin(math.radians(c))/2)

print((a**2+b**2-2*a*b*math.cos(math.radians(c)))**(1/2)+a+b)

print(a*b*math.sin(math.radians(c))/a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,C=map(int,input().split())
s=(a*b*math.sin(math.radians(C)))/2
c=(a**2+b**2-2*a*b*math.cos(math.radians(C)))**(1/2)
h=s*2/a
print(f'{s:4f}')
print(f'{a+b+c:4f}')
print(f'{h:4f}')

Submission status: Accepted

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


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,C = input().split( )
a1 = float(a)
b1 = float(b)
C1 = float(C)
print(a1*b1*math.sin(math.radians(C1))/2)
c1 = math.sqrt(a1**2+b1**2-2*a1*b1*math.cos(math.radians(C1)))
print(a1+b1+c1)
print(b1*math.sin(math.radians(C1)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

S = (1 / 2) * a * b * math.sin(C/180 * math.pi)
c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(C/180*math.pi))
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_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:
from math import sin,cos,pi,sqrt
a,b,d=map(float,input().split())
S=a*b*sin(d*pi/180)/2
c=sqrt(a**2+b**2-2*a*b*cos(d*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(int,input().split())
c = math.radians(c)
s = a*b*math.sin(c)/2
cr = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(c))
l = a + b + cr
h = b*math.sin(c)
print(s,l,h)

Submission status: Accepted

Solution code:
import math
values=input().split()
a=float(values[0])
b=float(values[1])
C=int(values[2])
sinC=math.sin(math.radians(C))
cosC=math.cos(math.radians(C))
S=1/2*a*b*sinC
c=pow(pow(a,2)+pow(b,2)-2*a*b*cosC,0.5)
L=a+b+c
h=2*S/a
print(S,L,h)

Submission status: Accepted

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

print(S,L,h)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

a, b, c = map(int, input().split())
c = math.radians(c)
s = a * b * math.sin(c) / 2
l = (a ** 2 + b ** 2 - 2 * a * b * math.cos(c)) ** (1/2) + a + b
h = s / a * 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)
s=0.5*a*b*(math.sin(c))

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

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

print('{:.08f}'.format(s))
print('{:.08f}'.format(l))
print('{:.08f}'.format(h))

Submission status: Accepted

Solution code:
import math

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

print(f'{S:.08f}')
print(f'{L:.08f}')
print(f'{h:.08f}')

Submission status: Accepted

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

c=math.radians(c)
s=0.5*a*b*(math.sin(c))

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

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

print('{:.08f}'.format(s))
print('{:.08f}'.format(l))
print('{:.08f}'.format(h))

Submission status: Accepted

Solution code:
import math

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

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

print(f'{S:.08f}')
print(f'{L:.08f}')
print(f'{h:.08f}')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,c=map(int,input().split())
s=a/2*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('{:.5f}\n{:.5f}\n{:.5f}'.format(s,l,h))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


a, b, C = map(float, input().split())
theta = math.radians(C)
S = 0.5 * a * b * math.sin(theta)
c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(theta))
h = b * math.sin(theta)
print("{:.9f}\n{:.9f}\n{:.9f}".format(S, a+b+c, h))

Submission status: Accepted

Solution code:
import math

pi=math.pi

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def p(x):
  print('{0:.6f}'.format(x))
from math import sqrt,sin,cos,pi

a,b,C = map(float,input().split())
theta = pi*C/180
h,c = 0.0,0.0

if theta<=pi/2:
  h = b*sin(theta)
  x = sqrt(b*b-h*h)
  c = sqrt(h**2+(a-x)**2)

else:
  phi = theta-pi/2
  h = b*cos(phi)
  d = b*sin(phi)
  e = a*h/(a+d)
  f = sqrt(d**2+(h-e)**2)
  g = sqrt(a**2+e**2)
  c = f+g

S = a*h/2
L = a+b+c
p(S)
p(L)
p(h)

Submission status: Accepted

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

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

print(S,L,h)

Submission status: Accepted

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

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("{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())
S = []
S += a*b*math.sin(math.radians(c))/2,
S += math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(c))) + a + b,
S += 2*S[0]/a,
print(*S, sep = "\n")

Submission status: Accepted

Solution code:
from enum import Enum
import sys
import math

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

A,B,DEGREE = map(int,input().split())

rad = math.radians(DEGREE)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

Solution code:
#10_B
import math
a,b,C=map(int,input().split())
S=a*b*math.sin((C*2*math.pi)/360)/2
c=math.sqrt(a**2+b**2-2*a*b*math.cos((C*2*math.pi)/360))
L=a+b+c
h=2*float(S)/a
print(str(S)+'\n'+str(L)+'\n'+str(h)+'\n')

Submission status: Accepted

Solution code:
import math
E=0
A,B,C=map(int,input().split())
print((1/2)*A*B*(math.sin(math.radians(C))))
print(((A**2)+(B**2)-2*A*B*(math.cos(math.radians(C))))**(1/2)+A+B)
print(((1/2)*A*B*(math.sin(math.radians(C))))*2/A)

Submission status: Accepted

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

import math

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

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

Submission status: Accepted

Solution code:
import math
a,b,c = map(float,input().split())
H = b * math.sin(math.radians(c))
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 
print(float(S))
print(float(L))
print(float(H))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

print(round(S,8),round(L,8),round(h,8))

Submission status: Accepted

Solution code:
#
# 10b
#
import math


def main():
    a, b, C, = map(float, input().split())
    d = math.radians(C)
    h = math.sin(d) * b
    S = a * h / 2
    L = a + b + math.sqrt(a**2+b**2-2*a*b*math.cos(d))
    print(f"{S: .4f}")
    print(f"{L: .4f}")
    print(f"{h: .4f}")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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

print(round(S, 8), round(L, 8), round(h, 8))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import math
a,b,C=map(float,input().split())
c1=math.sin(math.radians(C))
c2=math.cos(math.radians(C))
s=(1/2)*a*b*c1

d=(a*a+b*b-2*a*b*c2)**(1/2)
L=a+b+d

h=b*c1
print(s)
print(L)
print(h)