Why?为什mo
原题链接:30358.【栈】【入门】出入栈2026-07-06 21:46:34
发布于:山东
哪位大佬来看一下
x = list(map(int,input("").split(" ")))
stack = []
for i in x:
stack.append(i)
while stack:
print(f"=====stk.size[{len(stack)}]=====")
v = stack.pop()
print(f" stk.pop[{v}]")

































吾已崩溃
福了
全部评论 4
错了
昨天 来自 山东
0n = int(input())
x = list(map(int, input().split()))
stack = []
for num in x:
stack.append(num)
while stack:
size = len(stack)
top_val = stack.pop()
print(f"=stk.size[{size}]==")
print(f" stk.pop[{top_val}]")2天前 来自 江苏
0print(f"stk.size[{size}]")
2天前 来自 江苏
0
n = int(input())
x = list(map(int, input().split()))
stack = []
for num in x:
stack.append(num)
while stack:
size = len(stack)
top_val = stack.pop()
print(f"=stk.size[{size}]==")
print(f" stk.pop[{top_val}]")2天前 来自 江苏
0怎么了
2天前 来自 江苏
0














有帮助,赞一个