题目
思路
计算各点离原点的距离,找最大最小值即可
代码
num_=int(input())
best_id=''
best_score=0
worst_id=''
worst_score=10000
for i in range(num_):
id,x,y=input().split()
l=abs(int(x))*abs(int(x))+abs(int(y))*abs(int(y))
if l<worst_score:
worst_id=id
worst_score=l
if l>best_score:
best_id=id
best_score=l
print(f'{worst_id} {best_id}')