学进去-教育应平等而普惠
试题
类型:选择题
难度系数:0.65
所属科目:高中信息技术
有如下Python程序段:
a=[21,5,10,9,18,10,5,18,12,11]
n=len(a)
st=[0]*n; top=-1
for i in range(n):
     if top==-1:
          top+=1
          st[top]=a[i]
     else:
          if a[i]%2==0:
               while top>-1 and a[i]>st[top]:
                    top-=1
               top+=1
               st[top]=a[i]
while top>-1:
     print(st[top], end=“ ”)
     top-=1
执行该程序段后,输出结果为(       
A.12   18   18   21B.18   18   12C.21   18   18   12D.10   10   12   18   18
编辑解析赚收入
收藏
|
有奖纠错

同类型试题

优质答疑

y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2

用户名称
2019-09-19

y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2

用户名称
2019-09-19
我要答疑
编写解析
解析:

奖学金将在审核通过后自动发放到帐

提交
我要答疑
我要答疑:
提交