Advertisement
AlimusSifar

Clock Math - Toph.co - Beginner

Mar 18th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. h, m = map(int, input().split())
  2.  
  3. m_Angle = m*6
  4. h_Angle = h*30 + m*0.5
  5.  
  6. if abs(m_Angle - h_Angle) > 180:    # if internal angle is more than 180
  7.     print('%0.10f'% (360 - abs(m_Angle - h_Angle)))
  8. else:                               # if internal angle is less than 181
  9.     print('%0.10f'% abs(m_Angle - h_Angle))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement