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
|
1482 Discussions
|
Please Login in order to post a comment
size_group=int(input()) room_list=list(map(int,input().split()))
dict_room={i:room_list.count(i) for i in room_list}
for i in dict_room.items() : if i[1]==1: print(i[0])
K = int(input()) room_numbers = list(map(int, input().split())) room_numbers_set = set(room_numbers)
for room in room_numbers_set: count = 0 n = room for i in room_numbers: if n == i: count += 1 if count > 1: break if count == 1: print(n)
N = int(input()) A = list(map(int, input().split())) for n in set(A): A.remove(n) if n not in A: print(n) exit()