题型:单选题 题类: 难易度:普通
浙江省五校联盟2023-2024学年高二下学期信息技术期中考试试卷
a = [ 5 , 4 , 2 , 1 , 3 , 6 ] ; q = [ 0 ] * 6 ; head = tail = 0
for i in range( len( a ) ):
if a[ i ] % 2 == 1 :
q[ tail ] = a[ i ] ; tail = tail + 1
elif head < tail :
head += 1
print( tail – head )
执行该程序段后,输出结果为( )
试题篮