LoginSignup
0
0

More than 1 year has passed since last update.

ABC168 C - : (Colon) を解いた

Posted at

abc168c_1.png
abc168c_2.png
abc168c_3.png

ポイントは時針も分単位で動く事でしょうか。

abc168c.py
from math import *

A,B,H,M = map(int,input().split())

degH = H*60*0.5+M*0.5
degM = M*6
deg  = abs(degH-degM)

ans = A**2+B**2-2*A*B*cos(radians(deg))
print("{:.9f}".format(sqrt(ans)))
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0