File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
- # N, M을 공백을 기준으로 구분하여 입력 받기
1
+ # N, M을 공백을 기준으로 구분하여 입력받기
2
2
n , m = map (int , input ().split ())
3
3
4
- # 방문한 위치를 저장하기 위한 맵을 생성하여 0으로 초기화합니다.
4
+ # 방문한 위치를 저장하기 위한 맵을 생성하여 0으로 초기화
5
5
d = [[0 ] * m for _ in range (n )]
6
- # 현재 캐릭터의 X 좌표, Y 좌표, 방향을 입력 받기
6
+ # 현재 캐릭터의 X 좌표, Y 좌표, 방향을 입력받기
7
7
x , y , direction = map (int , input ().split ())
8
8
d [x ][y ] = 1 # 현재 좌표 방문 처리
9
9
10
- # 전체 맵 정보를 입력 받습니다.
10
+ # 전체 맵 정보를 입력받기
11
11
array = []
12
12
for i in range (n ):
13
13
array .append (list (map (int , input ().split ())))
@@ -46,7 +46,7 @@ def turn_left():
46
46
if turn_time == 4 :
47
47
nx = x - dx [direction ]
48
48
ny = y - dy [direction ]
49
- # 뒤로 갈 수 있다면 이동합니다.
49
+ # 뒤로 갈 수 있다면 이동하기
50
50
if array [nx ][ny ] == 0 :
51
51
x = nx
52
52
y = ny
@@ -55,5 +55,5 @@ def turn_left():
55
55
break
56
56
turn_time = 0
57
57
58
- # 정답을 출력합니다.
58
+ # 정답 출력
59
59
print (count )
You can’t perform that action at this time.
0 commit comments