battledev/exo1.py
2019-11-26 20:04:53 +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()