题解 | #重载运算#
重载运算
https://www.nowcoder.com/practice/342d1b8b0fe3416797bad62d22cbb51a
class Coordinate(object):
def __init__(self, x, y):
self.x=x
self.y=y
def __str__(self):
print((self.x,self.y))
def __add__(self,other):
return (self.x + other.x, self.y + other.y)
list1=list(map(int,input().split()))
list2=list(map(int,input().split()))
a=Coordinate(list1[0],list1[1])
b=Coordinate(list2[0],list2[1])
print(a+b)
