题解 | #重载运算#
重载运算
https://www.nowcoder.com/practice/342d1b8b0fe3416797bad62d22cbb51a
class Coordinate():
def __init__(self,a, b):
self.a = a
self.b = b
def add(self, t):
x = self.a + t.a
y = self.b + t.b
return (x, y)
a1, b1 = map(int, input().split())
a2, b2 = map(int, input().split())
C1 = Coordinate(a1, b1)
C2 = Coordinate(a2, b2)
print(C1.add(C2))

360集团公司氛围 420人发布