3 задача

 avatar
unknown
python
4 years ago
273 B
8
Indexable
surname, theme = map(str, input().split())
books = []
while True:
  string = input()
  if string == '0': break
  surname1, theme1, title = map(str, string.split())
  if surname1 == surname and theme1 == theme:
    books.append(title)

books.sort()
print(books[0])
Editor is loading...