Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson13-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
bc58ccaa
authored
Jul 10, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
0a7b0048
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
2 deletions
a.py
diy2.py
a.py
0 → 100644
View file @
bc58ccaa
import
time
S_T
=
time
.
time
()
print
(
'开始时间约为'
,(
S_T
-
S_T
%
1
))
v
=
0
i
=
0
a
=
[
88
,
75
,
72
,
82
,
90
,
85
,
78
,
91
]
for
i
in
range
(
len
(
a
)
-
1
):
for
v
in
range
(
len
(
a
)
-
1
-
i
):
if
a
[
v
]
>
a
[
v
+
1
]:
a
[
v
],
a
[
v
+
1
]
=
a
[
v
+
1
],
a
[
v
]
print
(
a
)
print
(
'----------------------------'
)
print
(
a
,
i
+
1
)
E_T
=
time
.
time
()
print
(
'结束时间约为'
,(
E_T
-
E_T
%
1
))
Use_Time
=
E_T
-
S_T
print
(
'总耗时'
,
Use_Time
)
\ No newline at end of file
diy2.py
View file @
bc58ccaa
alist
=
[
88
,
75
,
72
,
82
,
90
,
85
,
78
,
91
]
import
time
\ No newline at end of file
S_T
=
time
.
time
()
print
(
'开始时间约为'
,(
S_T
-
S_T
%
1
))
v
=
0
i
=
0
a
=
[
88
,
75
,
72
,
82
,
90
,
85
,
78
,
91
]
for
i
in
range
(
len
(
a
)
-
1
):
for
v
in
range
(
i
):
if
a
[
v
]
>
a
[
v
+
1
]:
a
[
v
],
a
[
v
+
1
]
=
a
[
v
+
1
],
a
[
v
]
print
(
a
)
print
(
'----------------------------'
)
print
(
a
,
i
+
1
)
E_T
=
time
.
time
()
print
(
'结束时间约为'
,(
E_T
-
E_T
%
1
))
Use_Time
=
E_T
-
S_T
print
(
'总耗时'
,
Use_Time
)
\ 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