单选题

有如下Python程序段:

a=[27,15,21,36,18]

f=[False]*5

i=0

while i<4 and not f[i]:

for j in range(4,i,-1):

if a[j]>a[j-1]:

a[j],a[j-1]=a[j-1],a[j]

f[i]=True

i=i+1

则程序运行之后,数组f中值为True的元素的个数是?(  )

A

1

B

2

C

3

D

4

赣ICP备20007335号-2