We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
If a triangle is right-angled then the center of its circumscribed circle is the midpoint of its hypotenuse and the median relative to the hypotenuse is half that of the hypotenuse.
///
import math
AB= int(input())
BC = int(input())
AC = math.hypot(AB,BC)
BM = AC / 2
/////////////
so we consider that M is the center of the circle arround the triangle
and the diametre of the cecle is AC
the triangle MBC is isosceles in M (MC = MB = MA )
then we need just to calculate the angle ACB to just know the Angel MBC
we will use the Big traingle ABC
////////////////
ACB = math.atan2(AB,BC)
print(str(round(math.degrees(ACB)))+ chr(176))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Find Angle MBC
You are viewing a single comment's thread. Return to all comments →