You are viewing a single comment's thread. Return to all comments →
Now Works perfectly....
mystr=input()
n,m=mystr.split()
mystr=mystr.rstrip()
myset=mystr.split()
mysetA=set(mystr.split())
mysetB=set(mystr.split())
happiness=0
for i in myset:
if i in mysetA: happiness=happiness+1 elif i in mysetB: happiness=happiness-1
print(happiness)
Seems like cookies are disabled on this browser, please enable them to open this website
No Idea!
You are viewing a single comment's thread. Return to all comments →
Now Works perfectly....
mystr=input()
n,m=mystr.split()
mystr=input()
mystr=mystr.rstrip()
myset=mystr.split()
mystr=input()
mystr=mystr.rstrip()
mysetA=set(mystr.split())
mystr=input()
mystr=mystr.rstrip()
mysetB=set(mystr.split())
happiness=0
for i in myset:
print(happiness)