Solve exo 1
This commit is contained in:
parent
f13e8da7ea
commit
2dc25838c2
1 changed files with 14 additions and 1 deletions
15
exo1.py
15
exo1.py
|
@ -1,5 +1,18 @@
|
|||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
pass
|
||||
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__":
|
||||
|
|
Loading…
Reference in a new issue