Solved LeetCode program · 973 of 1,000
#1344 · Angle Between Hands of a Clock
Original English source
The hour is 12, while the minutes is 30. The hourhand is (hour modulo 12) times 60 plus minutes. The minutehand is minutes times 12. The gap is the absolute value of (hourhand minus minutehand). The other is 720 minus gap. The answer is gap. If other is less than gap, set answer to other. Set answer to answer divided by 2.
Show answer.
Expected stdout
165