Title: 강력한 폭발, Time: 47ms, Memory: 16MB, Status: Passed - Codetree

This commit is contained in:
SSUM
2025-11-02 01:56:19 +09:00
parent e2d3bd76c4
commit 8223deb9cd

View File

@@ -16,7 +16,7 @@ def bomb_type2(x, y):
for dx, dy in [(1,0), (-1, 0),(0, 1),(0,-1)]:
nx = x + dx
ny = y + dy
if 0 <= nx <= n and 0 <= ny < n:
if 0 <= nx < n and 0 <= ny < n:
coords.add((nx, ny))
return coords
@@ -25,7 +25,7 @@ def bomb_type3(x, y):
for dx, dy in [(-1, 1), (-1, -1), (1, 1), (1, -1)]:
nx = x + dx
ny = y + dy
if 0 <= nx <= n and 0 <= ny < n:
if 0 <= nx < n and 0 <= ny < n:
coords.add((nx, ny))
return coords