We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Sets
- Set Mutations
- Discussions
Set Mutations
Set Mutations
Sort by
recency
|
801 Discussions
|
Please Login in order to post a comment
x = int(input())
li = input().split()
li = set([eval(i) for i in li])
n = int(input())
for line in range(int(n)):
Sum = sum(li)
print(Sum)
n = int(input()) a = set(map(int, input().split()))
for _ in range(int(input())): cmd = input().split() command = cmd[0] method = set(map(int, input().split()))
print(sum(a))
n = int(input()) a = set(map(int, input().split()))
for _ in range(int(input())): cmd = input().split() command = cmd[0] method = set(map(int, input().split()))
print(sum(a))
n = int(input()) a = set(map(int, input().split()))
for _ in range(int(input())): cmd = input().split() command = cmd[0]
print(sum(a))