Find Angle MBC

  • + 0 comments

    As mentioned by theflippedbit, this problem is rooted in the concept of circumscribed right triangles. If we draw the diameter of the circle (which serves as the hypotenuse), any point chosen on the circumference will form a right triangle. Since the midpoint of the hypotenuse (or midpoint of AC in our case) is also the center of the circle, it makes sense that AM = MC = MB.

    import math
    
    def angle(x, y):
        c = math.atan(x/y)
        ans = int(round(math.degrees(c), 0))
        print(f"{ans}\u00B0")
    
    if __name__ == '__main__':
        x = int(input().strip())
        y = int(input().strip())
        angle(x, y)