aboutsummaryrefslogtreecommitdiff
path: root/2025/04/b.py
diff options
context:
space:
mode:
Diffstat (limited to '2025/04/b.py')
-rw-r--r--2025/04/b.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/2025/04/b.py b/2025/04/b.py
index 93b1fff..583c076 100644
--- a/2025/04/b.py
+++ b/2025/04/b.py
@@ -7,13 +7,14 @@ def neigh(a, i, j):
7 a[i+1][j-1], a[i+1][j], a[i+1][j+1], 7 a[i+1][j-1], a[i+1][j], a[i+1][j+1],
8 ].count('@') 8 ].count('@')
9 9
10s = 0
11with fileinput.input() as lines: 10with fileinput.input() as lines:
12 a = [['.'] * 200] 11 a = [
13 for line in lines: 12 ['.'] * 200,
14 a.append(['.'] + list(line.replace('\n', '.'))) 13 *[['.'] + list(line.replace('\n', '.')) for line in lines],
15 a.append(['.'] * 200) 14 ['.'] * 200,
15 ]
16 16
17s = 0
17rem = True 18rem = True
18while rem: 19while rem:
19 rem = False 20 rem = False

Generated with cgit - Back to sebastiano.tronto.net