-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathmath_find_angle.py
51 lines (34 loc) · 932 Bytes
/
math_find_angle.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
Problem Statement
rsz_1438840048-2cf71ed69d-findangle.png ABC is a right angle triangle, right angled at B.
Therefore, ∡ABC=90°.
Point M is the mid-point of hypotenuse AC.
You are given the lengths AB and BC.
Your task is to find ∡MBC ( angle θ°, as shown in figure ) in degrees.
Input Format
First line contains, length of side AB.
Second line contains, length of side BC.
Constraints
0<AB<100
0<BC<100
Lengths AB and BC are natural numbers.
Output Format
Output ∡MBC in degrees.
Note: Round-off the angle to nearest integer.
Examples:
If angle is 56.5000001°, then output 57°.
If angle is 56.5000000°, then output 57°.
If angle is 56.4999999°, then output 56°.
0°<θ°<90°
Sample Input
10
10
Sample Output
45°
"""
# Enter your code here. Read input from STDIN. Print output to STDOUT
from math import atan,degrees
a=input()
b=input()
k=atan(1.0*a/b)
print str(int(round(degrees(k))))+'°'