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.
This is my code it works fine for three test cases when input gets highers i am not able to store all the values in my arrset that's your "sc_ar" set for example in input i give 1000 values and i dont know y my length of arrset is only 916 ! please help me by telling where
i went wrong
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 →
firstline=str(input()) happiness=0 arrset=set(input().split()) setA = set(input().split()) setB = set(input().split()) happiness += len(arrset.intersection(setA)) happiness -= len(arrset.intersection(setB)) print(happiness)
This is my code it works fine for three test cases when input gets highers i am not able to store all the values in my arrset that's your "sc_ar" set for example in input i give 1000 values and i dont know y my length of arrset is only 916 ! please help me by telling where i went wrong