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.
Can someone help me debug this? I'm getting EOFError for the input of command.
# Enter your code here. Read input from STDIN. Print output to STDOUTa=int(input())A=set(map(int,input().split()))N=int(input())foriinrange(2*N+1):command=list(map(str,input().split(' ')))S=set(map(int,input().split()))op=command[0]ifop=='intersection_update':A.intersection_update(S)elifop=='difference_update':A.difference_update(S)elifop=='update':A.update(S)elifop=='symmetric_difference_update':A.symmetric_difference_update(S)print(sum(A))
Cookie support is required to access HackerRank
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 →
Can someone help me debug this? I'm getting EOFError for the input of command.