You are viewing a single comment's thread. Return to all comments →
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)
Seems like cookies are disabled on this browser, please enable them to open this website
The Captain's Room
You are viewing a single comment's thread. Return to all comments →
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)