Search
Duplicate
๐Ÿ‘

AC

์ฃผ์ฐจ
20
๋ฌธ์ œ๋ฒˆํ˜ธ
5430
์–ธ์–ด
Python
ํ‹ฐ์–ด
๊ณจ๋“œ
์œ ํ˜•
๊ตฌํ˜„
nj_Blog
nj_์ƒํƒœ
์ดํ•ด๋„
ํ’€์ด
์‚ฌ๋žŒ
์ดํ•ด๋„ 2
13 more properties

์ฝ”๋“œ

case = int(input()) cmd = [] leng = [] arr = [] case_ = case while case_ > 0 : cmd.append(input()) leng.append(int(input())) str_ = input() str_ = str_[1:-1] if len(str_) == 0 : arr.append([]) else : str_ = str_.split(',') str_ = list(map(int, str_)) arr.append(str_) case_ -= 1 for i in range(0, case) : for l in range(0, len(cmd[i])): if cmd[i][l] == 'R' : arr[i].reverse() elif cmd[i][l] == 'D' : if len(arr[i]) == 0 : print("error") break else : arr[i].pop(0) else: print(arr[i])
Python
๋ณต์‚ฌ

ํ•ด์„ค

ใ…œ.ใ…œ ํƒ€์ž„์•„์›ƒ์ด๋ผ๋‹ˆ.....