первую задачу решил
This commit is contained in:
24
2025/day06/part2.py
Normal file
24
2025/day06/part2.py
Normal 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)
|
||||
Reference in New Issue
Block a user