diff options
Diffstat (limited to '2022/14/solve.py')
-rw-r--r-- | 2022/14/solve.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/2022/14/solve.py b/2022/14/solve.py index d327e85..ce78423 100644 --- a/2022/14/solve.py +++ b/2022/14/solve.py @@ -56,10 +56,7 @@ def solve(grounded): rocks(grid, line) if grounded: - ground = max( - max([i for i, y in enumerate(col) if y == ROCK], default=0) - for col in grid - ) + ground = max(y for _, y in sum(data, [])) for x in range(X): grid[x][ground + 2] = ROCK |