다른 풀이 1n = int(input())a = list(input().split())posX, posY = 1, 1move = ['L', 'R', 'U', 'D']dx = [-1, 1, 0, 0]dy = [0, 0, -1, 1]for i in a: k = move.index(i) if posX + dx[k] 다른 풀이 2n = int(input())way = list(input().split())move = [[0, -1], [0, 1], [1, 0], [-1, 0]]direction = ['L', 'R', 'D', 'U']start = [1, 1]for i in way: for k in range(len(direction)): if direction[k] == i: ..