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.
arr_set_size = input().split()
arr = input().split()
set1 = set(map(int, input().split()))
set2 = set(map(int, input().split()))
print(sum([(e in set1) - (e in set2) for e in arr]))
i wrote the same code but its still showing 0 instead of 1 for given input
3 2
1 5 3
3 1
5 7
whats wrong with the code
Cookie support is required to access HackerRank
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 →
arr_set_size = input().split() arr = input().split() set1 = set(map(int, input().split())) set2 = set(map(int, input().split())) print(sum([(e in set1) - (e in set2) for e in arr])) i wrote the same code but its still showing 0 instead of 1 for given input 3 2 1 5 3 3 1 5 7
whats wrong with the code