Skip to content

Commit e86cddd

Browse files
committed
feat: add "Sets" solution
1 parent 46c64b2 commit e86cddd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

the_captains_room.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
K = int(input())
2+
3+
tourists = input().split()
4+
single = set()
5+
group = set()
6+
for tourist in tourists:
7+
if tourist not in single:
8+
single.add(tourist)
9+
else:
10+
group.add(tourist)
11+
print(single.difference(group).pop())

0 commit comments

Comments
 (0)