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.
importmathdefmain():# a = AB and b = BCa,b=int(input()),int(input())# c = AC (hypotenuse)c=math.hypot(a,b)# Calculate angle A (opposite side a)# using the law of cosinescos_A=(b**2+c**2-a**2)/(2*b*c)angle_A_rad=math.acos(cos_A)angle_A_deg=math.degrees(angle_A_rad)print(f"{round(angle_A_deg)}\u00B0")if__name__=="__main__":main()
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 →
A different solution without tangent.