def f(k):
if k<=3:
print(k)
return
for i in range(1,4):
f(k-i)
执行语句f(6),则f(3)被调用的次数为( )
a=[27,5,25,36,78]
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+=1
执行该程序段后,数组f中值为True的元素个数是( )
①a[i]=k ②a[i-1]=k ③a[i+1]=a[i] ④a[i]=a[i-1]
⑤for i in range(j,9) ⑥for i in range(8,j-2,-1)
划线处所需代码依次为( )
def cal(n):
if n <= 1:
return 1
if n % 2 == 0:
return 2*cal(n-1)
执行语句k=cal(5),则k的值为( )
a = [0 for i in range(n+1)] for j in range(n+1)]
a[0][0]=1
for i in range(1,n+1):
a[i][0]=1
for j in range(1,i+1)
a[i][i] = a[i-1][j-1]+a[i-1][j]
import random
s= input()
k = random.randint( l,len(s)-1)
while k> 0 and i < len(s)-1:
if s[i]>s[i+1]:
k-= 1
s= s[:i]+s[i+1:]
if i> 0:
i-= 1
else:
i+= 1
if k> 0:
s = s[:len(s)-k]
若输入的s值为“8561324”,则执行该程序,输出s的值不可能为( )