most of the solutions which i submit in hackerrank are thrown timeout error, so i tried to find the execution time for one of the codes in sublime text 3 in my pc,and resulted in [finished in 220.5 sec] for an input of 2 million input.
problem statement: https://www.hackerrank.com/challenges/py-the-captains-room/problem
my solution:
n=int(input())
l_list=list(map(int,(input().split())))
l_set=set(l_list)
for i in l_set:
c=l_list.count(i)
if c==1:
print(i)
please help me in optimizing the code or is my system too slow???