惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - vcfly

理解性记忆const修饰普通变量和指针的新思路 - vcfly - 博客园 戏剧性的中超2008, 戏剧性的最后四轮,戏剧性的过程, 如我所愿的结果 Gmail换界面了 Hold fast and let go ... 数组 循环位移 或 循环移动 (左移 或 右移) K位 刚听了许巍的<<风行>>和<<故事>>, 软件开发之胡言乱语5-团队协作 软件开发之胡言乱语4: 实践与软件开发 Google is turning 10 软件开发之胡言乱语3-代码质量 软件开发之胡言乱语2 软件开发之胡言乱语1 决定个人软件质量高低的几个因素 调查: 哪些windows应用软件是用C#写的?哪些网站是用Asp.net写的? ZZ:<<给新人程序员的八点建议>> 越来越看不懂<<程序员>>... 写程序就像是上厕所 谁说Gmail不需要删邮件?! 单位门口的门卫
一道逻辑推理题: 猜生日
vcfly · 2008-11-10 · via 博客园 - vcfly

小明和小强都是张老师的学生,张老师的生日是M月N日,2人都知道张老师的生日是下列10组中的一天,张老师把M值告诉了小明,把N值告诉了小强,张老师问他们知道他的生日是哪一天?
3月4日 3月5日 3月8日
6月4日 6月7日
9月1日 9月5日
12月1日 12月2日 12月8日
小明说:如果我不知道的话,小强肯定也不知道
小强说:本来我也不知道,但是现在我知道了
小明说:哦,那我也知道了
请根据以上对话推断出张老师的生日是哪一天?


我的解析:
"小明说:如果我不知道的话,小强肯定也不知道" <<-->>
 对于M 所在的月的所有N值, 均不能唯一的确定生日.

根据12月2日如果知道2,可以唯一确定生日->M != 12,
同理6月7日知道7可以唯一确定生日->M != 6; 所以M = 3或 9.

"小强说:本来我也不知道,但是现在我知道了" <<-->>
在M = 3或9的前提下, N可以唯一确定生日.

从而推出:  N =1 或 4 或 8

"小明说:哦,那我也知道了 " <<-->>
在M = 3或9, N=1或4或8的前提下,M 可以唯一确定生日.

从而推出: M = 9,因为如果M=3的话, 小明还是不能确定生日,因为N有可能为4或8.

所以答案是: 9月1日.