14 lines
277 B
Python
14 lines
277 B
Python
from math import sqrt
|
|
|
|
|
|
def score(x, y):
|
|
distance_to_center: float = sqrt(x**2 + y**2)
|
|
if distance_to_center <= 1.0:
|
|
return 10
|
|
elif distance_to_center <= 5.0:
|
|
return 5
|
|
elif distance_to_center <= 10.0:
|
|
return 1
|
|
else:
|
|
return 0
|