You are viewing a single comment's thread. Return to all comments →
n = int(input()) n1=set(map(int,input().split())) m = int(input()) n2=set(map(int,input().split())) print(len(n1 & n2))
Seems like cookies are disabled on this browser, please enable them to open this website
Set .intersection() Operation
You are viewing a single comment's thread. Return to all comments →
n = int(input()) n1=set(map(int,input().split())) m = int(input()) n2=set(map(int,input().split())) print(len(n1 & n2))