The Captain's Room

  • + 0 comments

    i = int(input())

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

    list_1.sort()

    x = 0

    while x < len(list_1) - 1:

    if list_1[x] != list_1[x + 1]:
    
        print(list_1[x])
        break
    else:
    
        x += i  # Skip over group
    

    else:

    # If captain is at the end
    print(list_1[-1])