from random import randint
a=[1,8,3,6,7,2,9,0,5,1,3]
s=[-1]*100;top=-1
i=0
x=randint(5,8)
while i<x;
while top!=-1 and a[i] < s[top]:
top-=1
top+=1;s[top]=a[i]
i+=1
while top!=-1:
print(s[top],end="")
top-=1
执行该程序段后,输出的结果
A.0 | B.21 | C.631 | D.921 |

同类型试题

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


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

