22 тип егэ
unknown
python
a year ago
318 B
6
Indexable
Never
with open("22.txt") as file: processes = {'0': range(0, 1)} for line in file.readlines(): ID, time, related = line.split() start_time = max([max(processes[rel]) for rel in related.split(";")]) end_time = start_time + int(time) processes[ID] = range(start_time, end_time + 1)