×

Loading...

Topic

This topic has been archived. It cannot be replied.
  • 枫下沙龙 / 休闲娱乐 / 微软面试题目:-)
    1. 有10堆球,其中9堆(每个球)10斤,1堆(每个球)9斤。问如何称一次找出9斤的那堆球。
    2. 晚上,有四个人过河,分别需要1、2、5、10分钟。只有一把手电筒,过河的必要条件是有手电筒。最多可以两个人同时过河,但必须以两人中较慢的那个人的速度过去。问:所有人都过河,至少需几分钟?
    • 这是我来加的第一个面试的题目,不过咱们在国内都已经遇到过了.
      • 第二题是19分钟吗?
        • no :-)
    • 一堆是什么意思啊?
    • 1. Take 1 ball from the first group, 2 balls from the second group, ..., and 10 balls from the 10th group. Weight all those selected balls, and you will know.
      • Correct! And how about the 2nd question?
    • 2. 17 min as follows:
      Mark the four people as A(1), B(2), C(5), D(10)
      1) A(1) & B(2) ----> 2 min
      2) A(1) <------ 1 min
      3) C(5) & D(10) -----> 10 min
      4) B(2) <---- 2 min
      5) A(1) & B(2) ----> 2 min
      totally 17 min
      • Great! You are so clever! Admire you! :-)
        • Now that you admire me, how about buy me a dinner? ;)
          • Sounds reasonable ;-)
    • my solution for 1.
      1, Mark the heaps from 1 to 10. pick one ball from heap1, two balls from heap2, 3 balls from heap3, ... and 10 balls from heap10. Weight the balls. Minus the result from 55, the final result is the number of heap of 9-pound balls.
      • Exactly!
    • 回答题一
      把十堆球编号,1 至10。从第一堆球中取一个球,第二堆中取两个球,第三堆中取三个球,以此类推,至第九堆,共45个球。

      称量所有取出的球,如果是450斤,表明每个球重10斤,第十堆为9斤球。

      如果比450斤少9斤,则第9堆是九斤球;
      如果比450斤少8斤,则第8堆是九斤球;
      如果比450斤少7斤,则第7堆是九斤球;
      如果比450斤少6斤,则第6堆是九斤球;
      如果比450斤少5斤,则第5堆是九斤球;
      如果比450斤少4斤,则第4堆是九斤球;
      如果比450斤少3斤,则第3堆是九斤球;
      如果比450斤少2斤,则第2堆是九斤球;
      如果比450斤少1斤,则第1堆是九斤球。