作者Wantai (万太)
看板Math
标题Re: [新闻] 超怪面试问题 大象体重怎麽量
时间Sun Jan 2 02:15:47 2011
: 5. 可轻易达成的任务:苹果对软体品管工程师的应徵者说:「有3个盒子,
: 1个只装苹果、1个只装橘子、另1个则是两者都装,但盒上的标签都标错。
: 你要如何打开1个箱子,拿出1颗水果,仅看这颗水果,
: 你要如何立即把箱子上的标签都更正过来?」
重点是"盒上的标签都标错"
所以 a,b,c 排列方法有 6种 扣掉a不在首 b不置中 c不在尾的 只剩下 c,a,b b,c,a
意即 假设我照标签顺序排好箱子 苹果, 橘子, 苹橘
标签为苹果那个 打开必定不是苹果 如果是橘子 那箱内水果顺序必定为 橘子,苹橘,苹果
如果是苹橘 那箱内水果顺序必定为 苹橘,苹果,橘子
看了英文原文
“There are three boxes, one contains only apples, one contains only oranges,
and one contains both apples and oranges. The boxes have been incorrectly
labeled such that no label identifies the actual contents of the box it
labels. Opening just one box, and without looking in the box, you take out
^^^^^^^^^^^^^^^^^^^^^^^^^^
one piece of fruit. By looking at the fruit, how can you immediately label
all of the boxes correctly?”
在下了解推文的意思了 因为不能观看箱子内容物
那就是按照标签排好箱子 苹橘, 苹果, 橘子
标签为苹橘那个 打开必定不是苹橘 如果是苹果 那箱内水果顺序必定为 苹果,橘子,苹橘
如果是橘子 那箱内水果顺序必定为 橘子,苹橘,苹果
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.234.59
1F:→ jameschou :题目说只能拿一颗水果 这样苹橘你也有可能只拿到橘子 01/02 10:58
2F:→ jameschou :应该是要开苹橘那箱 这样可以确定那里面只有一个水果 01/02 10:59
3F:→ jameschou :再加上每个盒子标签都标错 剩下就好处理了 01/02 11:01
4F:推 s24601 :你的想法有错 01/02 11:51
※ 编辑: Wantai 来自: 140.112.234.59 (01/03 00:40)