Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【每日一题】- 2020-03-25 - 足球排球和篮球 #326

Open
azl397985856 opened this issue Mar 25, 2020 · 2 comments
Open

【每日一题】- 2020-03-25 - 足球排球和篮球 #326

azl397985856 opened this issue Mar 25, 2020 · 2 comments

Comments

@azl397985856
Copy link
Owner

@azl397985856 azl397985856 commented Mar 25, 2020

一个班级60%喜欢足球,70%喜欢篮球,80%喜欢排球,问:三种球都喜欢占比最大可能有多少,最小可能有多少?即求三种球都喜欢的比例范围

@azl397985856 azl397985856 changed the title 【每日一题】- 2020-03-24 - 足球排球和篮球 【每日一题】- 2020-03-25 - 足球排球和篮球 Mar 25, 2020
@azl397985856
Copy link
Owner Author

@azl397985856 azl397985856 commented Mar 25, 2020

(1)首先确定最多的一种情况,就是 60% 喜欢足球的人同时也喜欢篮球和排球,此时为三种球都喜欢的人的最大比例。

(2)然后确定最小的一种情况,根据题目可以知道有 40%的人不喜欢足球,30%的人不喜欢篮球,20%的人不喜欢排球,因此有最多 90% 的人三种球中有一种球不喜欢,因此三种球都喜欢的人的最小比例为 10%。

算法:

  • 首先考虑60 和 70, 都喜欢的比例最少是 (70 + 60 - 100) = 30
  • 然后30 和 80 结合,为 (30 + 80 - 100) = 10

总的来说就是(70 + 60 - 100) + 80 - 100 = 10

因此三种球都喜欢的人占比为 10%-60%

@nasty11pig
Copy link

@nasty11pig nasty11pig commented Apr 23, 2020

三球都喜欢的最大值为50%
最小值为:30%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.