[프로그래머스] 키패드 누르기(Java)
제출한 코드 public String solution(int[] numbers, String hand) { StringBuilder answer = new StringBuilder(); int[][] keypad = {{1, 4, 7, -1}, {2, 5, 8, 0}, {3, 6, 9, -1}}; int[] left = {0, 3}; int[] right = {2, 3}; int[] now = new int[2]; for (int number : numbers) { char c = '0'; for (int j = 0; j < 3; j++) { for (int k = 0; k < 4; k++) { if (number == keypad[j][k]) { now[0] = j; now[1] = k; break; ..
2023. 10. 22.