battledev/2019_11_26/exo1.py

20 lines
335 B
Python
Raw Normal View History

2019-11-26 20:04:53 +01:00
import sys
2019-11-26 17:30:52 +01:00
def main():
2019-11-26 20:04:53 +01:00
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]])
2019-11-26 17:30:52 +01:00
if __name__ == "__main__":
main()