Skip to content

Commit 7230290

Browse files
authored
Update 3.java
1 parent 8c353b5 commit 7230290

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

4/3.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public static void main(String[] args) {
88
// 현재 나이트의 위치 입력받기
99
String inputData = sc.nextLine();
1010
int row = inputData.charAt(1) - '0';
11-
int column = inputData.charAt(0) - 'a';
11+
int column = inputData.charAt(0) - 'a' + 1;
1212

1313
// 나이트가 이동할 수 있는 8가지 방향 정의
1414
int[] dx = {-2, -1, 1, 2, 2, 1, -1, -2};
@@ -29,4 +29,4 @@ public static void main(String[] args) {
2929
System.out.println(result);
3030
}
3131

32-
}
32+
}

0 commit comments

Comments
 (0)