# a = list(input())
# stack1 = []
# result = 0
# running = True
# for i in a:
# stack1_index = len(stack1) - 1
# if running == False:
# break
# if len(stack1) == 0 or i == "(" or i == "[" :
# stack1.append(i)
# stack1_index += 1
# continue
# while True:
# if i == ")" or i == "]":
# stack1_pop = stack1.pop()
# stack1_index -= 1
# if stack1_pop == "(" and result == 0 and i != "]":
# stack1.append(2)
# break
# elif stack1_pop == "(" and result != 0 and i != "]":
# result *= 2
# stack1.append(result)
# result = 0
# break
# elif stack1_pop == "[" and result == 0 and i != ")":
# stack1.append(3)
# break
# elif stack1_pop == "[" and result != 0 and i != ")":
# result *= 3
# stack1.append(result)
# result = 0
# break
# elif isinstance(stack1_pop, int):
# result += stack1_pop
# continue
# print(0)
# running = False
# break
# if running:
# for j in stack1 :
# if isinstance(j, str):
# print(0)
# running = False
# break
# if running:
# print(sum(stack1))
# list = [5,4,3,3,2,3,1]
# # 리스트의 마지막 원소 제거
# list.pop()
# print(list)
# #리스트의 첫번째 원소 제거
# del list[0]
# print(list)
# #리스트에서 3 값을 찾아서 제거 (최초로 만난 거만)
# list.remove(3)
# print(list)
# n = int(input())
# queue = []
# for count in range(n):
# command = input()
# if command[:4] == "push":
# queue.append(command.split()[1])
# elif command == "front()":
# if len(queue) == 0:
# print(-1)
# else:
# print(queue[0])
# elif command =="back()":
# if len(queue) == 0:
# print(-1)
# else:
# print(queue[-1])
# elif command == "pop()":
# if len(queue) == 0:
# continue
# else:
# del queue[0]
# elif command == "size()":
# print(len(queue))
# elif command == "empty()":
# if queue:
# print("false")
# else:
# print("true")
top of page

기능을 테스트하려면 라이브 사이트로 이동하세요.
20240623
20240623
댓글 0개
좋아요
댓글(0)
bottom of page