只要依次输出横坐标和纵坐标的最小值以及最大值就行
最小长方形
https://www.nowcoder.com/practice/dc6a75a15d1948edafa6d63bc8fc2368
numsX, numsY = [], [] while True: try: x, y = map(int, input().split()) if x == 0 and y == 0: print(min(numsX), min(numsY), max(numsX), max(numsY)) numsX.clear() numsY.clear() continue numsX.append(x) numsY.append(y) except: break