You are viewing a single comment's thread. Return to all comments →
Python 3
if __name__ == '__main__': (_, A) = (int(input()),set(map(int, input().split()))) B = int(input()) for _ in range(B): (command, newSet) = (input().split()[0],set(map(int, input().split()))) getattr(A, command)(newSet) print (sum(A))
Seems like cookies are disabled on this browser, please enable them to open this website
Set Mutations
You are viewing a single comment's thread. Return to all comments →
Python 3