题解 | 绕距
绕距
https://www.nowcoder.com/practice/7a245fc6284f4139b4fb21de58e68483
x1, y1 = map(int,input().split()) x2, y2 = map(int,input().split()) de = ((x1-x2)**2+(y1-y2)**2)**0.5 dm = abs(x1-x2)+abs(y1-y2) print(abs(de-dm))
绕距
https://www.nowcoder.com/practice/7a245fc6284f4139b4fb21de58e68483
x1, y1 = map(int,input().split()) x2, y2 = map(int,input().split()) de = ((x1-x2)**2+(y1-y2)**2)**0.5 dm = abs(x1-x2)+abs(y1-y2) print(abs(de-dm))
相关推荐