미로1에서 range의 값만 100으로 바꾸면 된다.
from collections import deque
move=[(-1,0),(1,0),(0,-1),(0,1)]#위 아래 왼 오
for tc in range(1,10+1):
t=int(input())
arr=[list(map(int,input())) for _ in range(100)]
q= deque()
q.append((1,1))
res=0
while q:
x,y=q.popleft()
if arr[x][y]==3:
res=1
break
arr[x][y]=1
for i in range(4):
mx=x+move[i][0]
my=y+move[i][1]
if 0<=mx<100 and 0<=my<100 and arr[mx][my]!=1:
q.append((mx,my))
print(f'#{tc} {res}')