Set .intersection() Operation

  • + 0 comments

    M = input() a = set(map(int, input().split())) N = input() b = set(map(int, input().split()))

    print(len(a.intersection(b)))