Created
May 18, 2020 00:01
-
-
Save monhime/608100b03c07c8ce29a238abf9134fac to your computer and use it in GitHub Desktop.
ABC168 C問題 解答
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def input(): return sys.stdin.readline().rstrip() | |
import math | |
def main(): | |
a,b,h,m=map(int,input().split()) | |
theta_a=(60*h+m)*2*math.pi/720 | |
theta_b=m*2*math.pi/60 | |
print(math.sqrt((a*math.cos(theta_a)-b*math.cos(theta_b))**2+(a*math.sin(theta_a)-b*math.sin(theta_b))**2)) | |
if __name__=='__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment