Commit e7af3c34 by BellCodeEditor

auto save

parent 23dfff73
Showing with 50 additions and 0 deletions
# #递推 递归 出口 传递的关系式
# #位置传参
# #爬楼梯,一次只能爬1,2,3步。请问爬10步可以有多少种方法。
# # 1 1 1
# # 2 11 2 2
# # 3 111 12 21 3 4
# # 4 1111 112 121 211 22 13 31 7
# import time
# k=time.time()
# a=1
# b=2
# c=4
# for i in range(300):
# d=a+b+c
# a=b
# b=c
# c=d
# print(c)
# # def a(n):
# # if n==1:
# # return 1
# # if n==2:
# # return 2
# # if n==3:
# # return 4
# # return a(n-1)+a(n-2)+a(n-3)
# # print(a(30))
# j=time.time()
# print(j-k)
# a=['3','fe','56',45,67]#遍历 循环 a[1]
# b=['3','4']
# i=0
# while i<5:
# if a[i] in b:
# print(a[i],'在的')
# else:
# print(a[i],'不在')
# i=i+1
# for i in range(101):
# if i in b:
# print(i,'在的')
# else:
# print(i,'不在')
计算出1+2+3+....+100的和
计算出1-100之间所有的奇数和
5/2=2...1
4/2=2...0
7/2=3...1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment