battledev/2019_11_26/exo1.py
2019-11-27 09:18:06 +01:00

19 lines
335 B
Python

import sys
def main():
lines = []
for line in sys.stdin:
lines.append(line.rstrip("\n"))
lengths = {}
for line in lines[1:]:
name, length = line.split()
length = int(length)
lengths[length] = name
print(lengths[sorted(lengths.keys())[0]])
if __name__ == "__main__":
main()