덱 (1) 썸네일형 리스트형 [ BOJ / 파이썬 ] 5430 AC / 제출 1 / import sys input = sys.stdin.readline tc = int(input()) for i in range(tc): oper = input().strip() n = int(input()) nums = input() if n == 0: print('error') break nums = nums[1:-2] if len(nums) > 2: nums = list(map(int, nums.split(','))) # oper 에서 RR 처리 while 'RR' in oper: oper = oper.replace('RR', '') # ㅇ이고.. replace는 리턴을 주는 녀석이었다. for o in oper: if len(nums) == 0: nums = 'error' break.. 이전 1 다음