[내가 구현한 코드]N = int(input())moves = input().split()current_X = 1current_Y = 1for i in moves: if current_X = N+1 or current_Y = N+1: countinue else: if moves[i] == "R": current_X += 1 if moves[i] == "L": current_X -= 1 if moves[i] == "U": current_Y += 1 if moves[i] == "D": current_Y -= 1print(current_X, current_Y)..