bumpsoo 2026-06-18 13:21:35 +00:00
parent dcc322307d
commit 14772aa21f

View file

@ -0,0 +1,8 @@
# https://leetcode.com/problems/angle-between-hands-of-a-clock
class Solution:
def angleClock(self, hour: int, minutes: int) -> float:
minute = 360 / 60 * minutes
hour = hour % 12
hour = 360 / 12 * hour + 360 / 12 / 60 * minutes
return min(abs(hour - minute), 360 - abs(hour - minute))