The Captain's Room

  • + 0 comments

    I tried using set since it is from the sets section. Time is exceeding limit, anyone who can optimize this. N=int(input()) m=list(map(int, input().split())) n=set(m) l=[] for i in n: count=0 for j in m: if i==j: count +=1 l.append([i,count])

    for i in l: if i[1]==1: print(i[0])