Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
106281 | 彭士宝 | 07切比雪夫距离 | Python3 | Accepted | 35 MS | 3768 KB | 368 | 2025-01-15 21:12:23 |
def chebyshev_distance(a, b, c, d): # 计算两个点的坐标差值的绝对值 difference_x = abs(a - c) difference_y = abs(b - d) # 选择较大值作为切比雪夫距离 return max(difference_x, difference_y) # 输入 a, b, c, d = map(int, input().split()) # 计算并输出切比雪夫距离 print(chebyshev_distance(a, b, c, d))