The Captain's Room

  • + 0 comments

    solve it by using dict add the values and just call the value whose count is one thats the captain room

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

    dict1 = {}

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

    for keys,values in dict1.items(): if values == 1: print(keys)