나의 풀이 n = int(input()) cmd = input().split() x, y = 1, 1 move_types = ['L', 'R', 'U', 'D'] dx = [0, 0, -1, 1] dy = [-1, 1, 0, 0] for c in cmd: for i in range(len(move_types)): if c == move_types[i]: tmp_x = x + dx[i] tmp_y = y + dy[i] if tmp_x n or tmp_y n: continue else: x, y = tmp_x, tmp_y print(x, y) 답안 예시 # N 입력받기 n = int(input()) x, y = 1, 1 plans = input().spl..