diff --git "a/CodingTest/CH4 \352\265\254\355\230\204/4-1.py" "b/CodingTest/CH4 \352\265\254\355\230\204/4-1.py" index 16519ae..9e8afd7 100644 --- "a/CodingTest/CH4 \352\265\254\355\230\204/4-1.py" +++ "b/CodingTest/CH4 \352\265\254\355\230\204/4-1.py" @@ -7,13 +7,13 @@ for i in range(len(direction)): if direction[i] == 'R': - if x == n: + if y == n: y += 0 else: y += 1 elif direction[i] == 'L': - if x == 1: + if y == 1: y += 0 else: y -= 1 @@ -25,9 +25,10 @@ x -= 1 elif direction[i] == 'D': - if y == n: + if x == n: x += 0 else: x += 1 + print(x, y) \ No newline at end of file