You are viewing a single comment's thread. Return to all comments →
k, rooms, single, multiple = input(), input().split(), set(), set()
for room in rooms: single.add(room) if room not in single else multiple.add(room)
print(single.difference(multiple).pop())
I think I am too late. But it's easier with logic than math
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, rooms, single, multiple = input(), input().split(), set(), set()
for room in rooms: single.add(room) if room not in single else multiple.add(room)
print(single.difference(multiple).pop())
I think I am too late. But it's easier with logic than math