Skip to content

Commit 8e53a94

Browse files
committed
🎄 Add solution to 2024-12-25
1 parent 7578361 commit 8e53a94

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

2024/day25/solutions.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from itertools import combinations
2+
3+
with open("input") as f:
4+
gs = f.read().strip().split("\n\n")
5+
6+
# Part 1
7+
print(
8+
sum(
9+
g1[0] != g2[0] and not any({x1, x2} == {"#"} for x1, x2 in zip(g1, g2))
10+
for g1, g2 in combinations(gs, 2)
11+
)
12+
)

0 commit comments

Comments
 (0)