Advertisement
nq1s788

22 (короткий вариант)

May 22nd, 2024 (edited)
563
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. #ввод из консоли (скопировать таблицу из экселя и вставить) (руками)
  2. answ = {0: 0}
  3. while True:
  4.     id, time, *treb = map(int, input().replace(';', ' ').split())
  5.     answ[id] = max([answ[ask] for ask in treb]) + time
  6.     print(max(answ.values()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement