Witam !
Dostaję błąd NZEC w zadaniu:
Kod w Python 3
from math import sqrt, pow
def count_distance(x,y):
return sqrt(pow(x,2) + pow(y,2))
t = int(input())
while(t!=0):
n = int(input())
keys = range(n)
d = {}
for i in keys:
name,x,y = input().split()
x = int(x)
y = int(y)
distance = count_distance(x,y)
d[name] = [x,y,distance]
sorted_d = sorted(d.items(), key=lambda kv: kv[1])
print()
for keys, values in sorted_d:
print(keys,end=" ")
print(values[0],end=" ")
print(values[1],end=" ")
print()
t = t-1