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.
- Prepare
- Python
- Sets
- The Captain's Room
- Discussions
The Captain's Room
The Captain's Room
Sort by
recency
|
1558 Discussions
|
Please Login in order to post a comment
For Python3 Platform
from collections import Counter
memberOfFamilyK = input() roomNumbers = list(map(int,input().split())) anotherSet = set(roomNumbers) count = Counter(roomNumbers) for c,i in count.items(): if i != int(memberOfFamilyK): print(c)
from collections import Counter
size_of_each_group = int(input()) unorder_list = list(map(int, input().split()))
count = Counter(unorder_list)
for s in count: if count[s] == 1: print(s)
I couldn't help myself.