File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change
1
+ occ = {"." : [], "#" : []}
2
+
3
+ for schematic in open (0 ).read ().split ("\n \n " ):
4
+ counts = tuple (c .count ("#" ) for c in zip (* schematic .split ()))
5
+ occ [schematic [0 ]].append (counts )
6
+
7
+ print (sum (all (k + l <= 7 for k ,l in zip (key ,lock ))
8
+ for key in occ ['.' ]
9
+ for lock in occ ["#" ]))
Original file line number Diff line number Diff line change 1
1
<!-- AOC TILES BEGIN -->
2
2
<h1 align =" center " >
3
- Advent of Code - 258/498 ⭐
3
+ Advent of Code - 260/500 ⭐
4
4
</h1 >
5
5
<h1 align =" center " >
6
- 2024 - 48 ⭐ - Python
6
+ 2024 - 50 ⭐ - Python
7
7
</h1 >
8
8
<a href =" 2024/01/01.py " >
9
9
<img src =" .aoc_tiles/tiles/2024/01.png " width =" 161px " >
77
77
<a href =" 2024/24/24.py " >
78
78
<img src =" .aoc_tiles/tiles/2024/24.png " width =" 161px " >
79
79
</a >
80
+ <a href =" 2024/25/25.py " >
81
+ <img src =" .aoc_tiles/tiles/2024/25.png " width =" 161px " >
82
+ </a >
80
83
<h1 align =" center " >
81
84
2023 - 50 ⭐ - Python
82
85
</h1 >
You can’t perform that action at this time.
0 commit comments