Skip to content

Commit 2ffbf08

Browse files
committed
🎄 Add solution to 2024-12-25
1 parent 7578361 commit 2ffbf08

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

2024/day25/solutions.py

+12
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+
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)