Skip to content

Instantly share code, notes, and snippets.

@rexlow
Created July 16, 2018 07:40
Show Gist options
  • Save rexlow/a33b915f1f7472fa40d91623e999523b to your computer and use it in GitHub Desktop.
Save rexlow/a33b915f1f7472fa40d91623e999523b to your computer and use it in GitHub Desktop.
Hackerrank The Captain's Room Challenge
from collections import Counter
a, b = int(input()), list(map(int, input().split()))
d = dict(Counter(b))
print(min(d, key=lambda k: d[k]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment