The Captain's Room

Sort by

recency

|

1503 Discussions

|

  • + 0 comments

    hello there

  • + 0 comments

    K = int(input()) rooms = list(map(int,input().split()))

    Group = {} for i in rooms: Group[i] = Group.get(i,0) +1

    for key, value in Group.items(): if value == 1: print(key)

  • + 0 comments
    k = int(input())
    room_no = input().split()
    room_no = sorted(room_no)
    c_room = set(room_no[1::2]) ^ set(set(room_no[0::2]))
    print(c_room.pop())
    
  • + 0 comments

    a = int(input())

    set_a = list(map(int, input().split()))

    seen_once = set()

    seen_multiple = set()

    for i in set_a: if i in seen_once: seen_multiple.add(i) else: seen_once.add(i) unique_elements = seen_once - seen_multiple for element in unique_elements: print(element)

  • + 0 comments

    from collections import Counter

    k = int(input())

    room_no = list(map(int,input().split()))

    room_count = Counter(room_no)

    for keys, values in room_count.items():

    if values < 5: print(keys)