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.
frommathimportsqrt,cos,acos,asin,sin,degreesab=float(input())bc=float(input())# Pythagoras theoremac=sqrt(ab**2+bc**2)mc=ac/2# definition of cos and sin, delta is angle ACBcos_delta=bc/acsin_delta=ab/ac# law of cosines to find mbmb=sqrt(bc**2+mc**2-2*bc*mc*cos_delta)# law of sines to find sin_thetasin_theta=(mc*sin_delta)/mbprint(f"{round(degrees(asin(sin_theta)))}\N{DEGREE SIGN}")
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 →
I had to refresh high school trigonometry.