Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Item:
- def __init__(self, value):
- self.value = value % 3
- def __add__(self, other):
- return Item(self.value + other.value)
- def __radd__(self, other):
- return Item(self.value + other)
- def __repr__(self):
- return str(self.value)
- numbers = list(map(Item, map(int, input().split())))
- print(sum(numbers))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement