Clock Hand Angle

You can calculate the angle between clock hands from the current time. Given hours and minutes, return the smaller angle between the hour hand and the minute hand. Remember that the hour hand moves smoothly between hour marks as the minutes pass. Round the result to one decimal place.

Примеры

Ввод
3, 0
Вывод
90
Ввод
12, 0
Вывод
0
Ввод
6, 0
Вывод
180

Нужно реализовать

def clock_angle(hours: int, minutes: int) -> float:

Теги

math
PostgreSQLv16

Tady se objeví výsledek běhu kódu

Tests12
Visible tests
Skrytý test 7
Skrytý test 8
Skrytý test 9
Skrytý test 10
Skrytý test 11
Skrytý test 12

They run when you press "Submit" — your whole solution is checked against them so you can't hard-code answers for the visible cases.

Focus radio
Paused · SomaFM · Fluid