Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson14-diy2
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
2f7ce171
authored
Dec 26, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
ea8973d7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
12 deletions
dfr.py
diy2.py
dfr.py
0 → 100644
View file @
2f7ce171
a
=
43573
+
26933
print
(
a
)
\ No newline at end of file
diy2.py
View file @
2f7ce171
def
func
(
n
):
1
x
if
n
<=
2
:
1
d
return
1
1
d
1
x
else
:
2
d
1
x
result
=
func
(
n
-
1
)
+
func
(
n
-
2
)
3
d
2
x
return
result
5
d
3
x
for
i
in
range
(
3
,
15
):
8
d
5
x
res
=
func
(
i
)
13
d
8
x
if
res
>=
20
:
21
d
13
x
print
(
"第"
+
str
(
i
)
+
"个月的时候兔子数量大于20"
)
34
d
21
x
break
55
d
34
x
\ No newline at end of file
89
d
55
x
144
d
89
x
223
d
144
x
367
d
223
x
589
d
367
x
956
d
589
x
1545
d
956
x
2401
d
1545
x
3946
d
2401
x
6347
d
3946
x
10293
d
6347
x
16640
d
10293
x
26933
d
16640
x
\ No newline at end of file
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