первую задачу решил

This commit is contained in:
2025-12-06 17:26:10 +03:00
parent f8f92b105d
commit 120fe2e2d6
3 changed files with 54 additions and 0 deletions

24
2025/day06/part2.py Normal file
View File

@@ -0,0 +1,24 @@
input = """123 328 51 64
45 64 387 23
6 98 215 314
* + * + """
# with open("input.txt", "r") as file:
# input = file.read()
numbers = [list(map(str, row)) for row in input.splitlines()[:-1]]
print(numbers)
operators = input.splitlines()[-1]
print(operators)
# result = [row for row in numbers[0]]
# for row in numbers[1:]:
# for index in range(len(result)):
# element = row[index]
# op = operators[index]
# if op == "*":
# result[index] *= element
# elif op == "+":
# result[index] += element
# count = 0
# for row in result:
# count += row
# print(result)
# print(count)