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

Tukaj bo rezultat izvajanja kode

Tests12
Visible tests
Skriti test 7
Skriti test 8
Skriti test 9
Skriti test 10
Skriti test 11
Skriti 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