赞
踩
选择题答案:CCBAD
n=int(input())
print(n//7)
n=int(input())
print(sum(list(range(1,n+1,2))))
n=int(input())
count=0
for i in range(100,n+1):
ii=str(i)
if int(ii[0])**3+int(ii[1])**3+int(ii[2])**3==i:
count += 1
print(count)
ls=[int(i) for i in input().split(',')]
m=min(ls)
while True:
m+=1
if m not in ls:
print(m)
break;
def F(x,y,n):
if n <= 0:
return 0
elif n == 1:
return 1
elif n==x:
return 0
elif n==y:
return 0
else:
return F(x,y,n - 1) + F(x,y,n - 2)
ls=list(map(int,input().split(',')))
print(F(ls[0],ls[1],ls[2]))
n=int(input()) cnt=0 col=[False for i in range(20)] #列下标的列表 bias1=[False for i in range(40)] #斜线/横纵之和作为下标的列表 bias2=[False for i in range(40)] #反斜线\横纵之差作为下标的列表 def check(x,y): return not col[y] and not bias1[x+y] and not bias2[x-y] def dfs(x): global cnt if x>n: cnt+=1 return for y in range(1,n+1): if check(x,y): col[y]=bias1[x+y]=bias2[x-y]=True dfs(x+1) col[y]=bias1[x+y]=bias2[x-y]=False dfs(1) print(cnt)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。