This commit is contained in:
2025-12-05 11:24:04 +03:00
parent 0cab1feae9
commit 8b91167f8d
2 changed files with 1210 additions and 2 deletions

1193
2025/day05/input.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -14,12 +14,27 @@ input = """3-5
17
32"""
input = """515109478873629-517495683097941
55910578479451-59894189259887
388889831860114-389361546156805
426667061525753-431247335780190
163539375204061
531903863069312
34101977519160
164401920447043
5765415079155
235541805889895
241438782449974
228538610394597
557824039518207"""
# with open("input.txt", "r") as file:
# input = file.read()
range_list = list(map(str, input.split("\n\n")[0].split("\n")))
items_list = list(map(int, input.split("\n\n")[1].split("\n")))
range_list = list(map(str, input.split("\n\n")[0].strip().split("\n")))
items_list = list(map(int, input.split("\n\n")[1].strip().split("\n")))
# получаем все возможные не "протухшие" id продуктов
for element in range_list:
valid_id += [i for i in range(int(element.split("-")[0]),int(element.split("-")[1])+1)]