The Captain's Room

Sort by

recency

|

1500 Discussions

|

  • + 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)

  • + 0 comments

    here's my code:

    k=int(input ()) s=list(map(int, input() .split())) s1=set() s2=set() for i in s: if i in s1: s2. add (i) else: s1. add (i) result=s1-s2 print (*result)

  • + 0 comments

    Here's my code:

    k, t = int(input()), list(map(int, input().split()))
    print(((sum(set(t))*k)-sum(t))//(k-1))
    
  • + 0 comments

    from collections import Counter k = int(input()) room = list(map(int, input().split())) count = Counter(room) for k,v in count.items(): if v == 1: print(k)