Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-3-1_DIY1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e7af3c34
authored
Dec 27, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
23dfff73
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
1.py
1.py
0 → 100644
View file @
e7af3c34
# #递推 递归 出口 传递的关系式
# #位置传参
# #爬楼梯,一次只能爬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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment