1
0

solving part 2

This commit is contained in:
Nicolas Green 2024-12-03 11:27:49 -05:00
parent 162fc8cf2f
commit 4a405ba095
No known key found for this signature in database
3 changed files with 1019 additions and 0 deletions

13
day1/part2.py Normal file
View File

@ -0,0 +1,13 @@
first_list = []
second_list = []
result = 0
with open("part2_input.txt", "r") as file_input:
for row in file_input:
first_column, second_column = map(int, row.split(" "))
first_list.append(first_column)
second_list.append(second_column)
for i in first_list:
result += i * second_list.count(i)
print(result)

1000
day1/part2_input.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
3 4
4 3
2 5
1 3
3 9
3 3