Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson13-3
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
b25ca0ce
authored
Nov 05, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
af406c84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
1.py
1.py
0 → 100644
View file @
b25ca0ce
篮球比赛是高分的比赛,领先优势可能很快被反超。作为观众,希望能在球赛即将结束时,
就提早知道领先是否不可超越,请编程一种算法,用于判断领先是否“安全”。
算法描述:
获取领先的分数,减去
3
分;
如果目前是领先队控球,则加
0.5
;否则减
0.5
(数字小于
0
则变成
0
)
计算平方后的结果;
如果得到的结果比当前比赛剩余时间的秒数大,则领先是“安全的”。
\ 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