diff options
Diffstat (limited to '2025/04/b.py')
| -rw-r--r-- | 2025/04/b.py | 11 |
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 | ||
| 10 | s = 0 | ||
| 11 | with fileinput.input() as lines: | 10 | with 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 | ||
| 17 | s = 0 | ||
| 17 | rem = True | 18 | rem = True |
| 18 | while rem: | 19 | while rem: |
| 19 | rem = False | 20 | rem = False |
