Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-2
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
d0476674
authored
a year ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
560bb087
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
0 deletions
Untitled-1.py.py
Untitled-1u.py
Untitled-5.py.py
Untitled-1.py.py
0 → 100644
View file @
d0476674
m
=
int
(
input
(
"请输入药品总数"
))
n
=
int
(
input
(
"请输入取药人数"
))
a
=
input
(
"请输入取药量"
)
a
=
a
.
split
(
" "
)
num
=
0
for
i
in
range
(
n
):
if
int
(
a
[
i
])
>
m
:
num
=
num
+
1
else
:
m
=
m
-
int
(
a
[
i
])
print
(
num
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Untitled-1u.py
0 → 100644
View file @
d0476674
for
i
in
range
(
100
,
1000
):
su
=
True
for
j
in
range
(
2
,
i
):
if
i
%
j
==
0
:
su
=
False
if
i
%
10
==
i
//
100
and
su
:
print
(
i
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Untitled-5.py.py
0 → 100644
View file @
d0476674
n
=
int
(
input
(
"请输入组数"
))
x
=
input
(
"请输入鸡尾酒疗法总病例数以及有效病例数"
)
x
=
x
.
split
(
","
)
x1
=
int
(
x
[
1
])
/
int
(
x
[
0
])
print
(
x
)
for
i
in
range
(
n
-
1
):
y
=
input
(
"请输入改进疗法总病例数以及有效病例数"
)
y
=
y
.
split
(
","
)
y1
=
int
(
y
[
1
])
/
int
(
y
[
0
])
if
y1
-
x1
>
0.05
:
print
(
"better"
)
elif
(
x1
-
y1
>
0.05
):
print
(
"worse"
)
else
:
print
(
"same"
)
This diff is collapsed.
Click to expand it.
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