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.
def acmTeam(topic):
# Write your code here
combs = [ sum([ 1 if i=='1' or j=='1' else 0 for i, j in zip(s1, s2)]) for s1, s2 in combinations(topic, 2)]
key_value = sorted(Counter(combs).items())[-1]
return list(key_value)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
ACM ICPC Team
You are viewing a single comment's thread. Return to all comments →
def acmTeam(topic): # Write your code here combs = [ sum([ 1 if i=='1' or j=='1' else 0 for i, j in zip(s1, s2)]) for s1, s2 in combinations(topic, 2)] key_value = sorted(Counter(combs).items())[-1] return list(key_value)