-
问:有20瓶药,其中19瓶装的都是1.0克的药片,只有1瓶装了1.1克的药。给你一个能称出具体克数的电子秤,只允许你称一次,怎么找出那瓶不一样的?
答:如果药片足够,从第i(1<i<20)个瓶子里取出数量为i的药片称重为Xg,[X-(21*20/2)]/0.1即为装了1.1g药的瓶子的编号。 -
Q:A bunch of men are on an island. A genie comes down and gathers everyone together and places a magical hat on some people’s heads ( i.e., at least one person has a hat). The hat is magical: it can be seen by other people, but not by the wearer of the hat himself. To remove the hat, those (and only those who have a hat) must dunk themselves underwater at exactly midnight. If there are n people and c hats, how long does it take the men to remove the hats? The men cannot tell each other (in any way) that they have a hat.
A:假如只有一个帽子,那么戴着帽子的那个人出去一看,另外n-1个人都没有帽子, 而题目已经说了,至少有一个人是戴着帽子的,所以可以推断唯一一个戴着帽子的就是自己, 于是他会在第1天的午夜泡到水里,去掉头上的帽子。
如果有2个帽子, 比如说是A和B戴着,A第1天发现B是戴着帽子的,而A又不知道一共有多少个帽子, 所以他无法判断自己头上是否戴了帽子,因此A第1天什么也不做。同理,B也一样。 到了第二天,A发现B还戴着他的帽子,这就说明了至少要有2顶帽子。否则如果只有一顶, B能推理出来,并且在第一天午夜就去掉它了。如果至少有2顶,B已经戴了一顶, 那