Dartboard Score

Imagine a dartboard with three circles around the center. The function score receives the hit coordinates x and y and returns the number of points for that position. A hit within radius 1 gives 10 points, within radius 5 gives 5, within radius 10 gives 1, and anything outside the target gives 0.

Примеры

Ввод
(0, 0)
Вывод
10
Ввод
(-0.1, -0.1)
Вывод
10
Ввод
(0, 5)
Вывод
5

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

def score(x: float, y: float) -> int:

Теги

math
PostgreSQLv16

Le résultat de l'exécution du code s'affichera ici

Visible tests
1
Input
0, 0
Expected10
2
Input
-0.1, -0.1
Expected10
3
Input
0, 5
Expected5
4
Input
-5, 0
Expected5
5
Input
0, 10
Expected1
6
Input
10, 10
Expected0
Focus radio
Paused · SomaFM · Fluid