Your rich, eccentric uncle just passed away, and you and your 99 nasty relatives have been invited to the reading of his will. He wanted to leave all of his money to you, but he knew that if he did, your relatives would pester you forever. So he is banking on the fact that he taught you everything you need to know about riddles. Your uncle left the following note in his will: "I have created a puzzle. If all 100 of you answer it together, you will share the money evenly. However, if you are the first to find the pattern and solve the problem without going through all of the leg work, you will get the entire inheritance all to yourself. Good luck." The lawyer takes you and your 99 relatives to a secret room in the mansion that contains 100 lockers, each hiding a single word. He explains: Every relative is assigned a number from 1 to 100. Heir 1 will open every locker. Heir 2 will then close every second locker. Heir 3 will change the status of every third locker, specifically if it's open, she'll close it, but if it's closed, she'll open it. This pattern will continue until all 100 of you have gone. The words in the lockers that remain open at the end will help you crack the code for the safe. Before cousin Thaddeus can even start down the line, you step forward and tell the lawyer you know which lockers will remain open. But how? Pause the video now if you want to figure it out for yourself! Answer in: 3 Answer in: 2 Answer in: 1 The key is realizing that the number of times a locker is touched is the same as the number of factors in the locker number. For example, in locker #6, Person 1 will open it, Person 2 will close it, Person 3 will open it, and Person 6 will close it. The numbers 1, 2, 3, and 6 are the factors of 6. So when a locker has an even number of factors it will remain closed, and when it has an odd number of factors, it will remain open. Most of the lockers have an even number of factors, which makes sense because factors naturally pair up. In fact, the only lockers that have an odd number of factors are perfect squares because those have one factor that when multiplied by itself equals the number. For Locker 9, 1 will open it, 3 will close, and 9 will open it. 3 x 3 = 9, but the 3 can only be counted once. Therefore, every locker that is a perfect square will remain open. You know that these ten lockers are the solution, so you open them immediately and read the words inside: "The code is the first five lockers touched only twice." You realize that the only lockers touched twice have to be prime numbers since each only has two factors: 1 and itself. So the code is 2-3-5-7-11. The lawyer brings you to the safe, and you claim your inheritance. Too bad your relatives were always too busy being nasty to each other to pay attention to your eccentric uncle's riddles.
你那個富有、古怪的叔叔剛去世, 你和你 99 個卑劣的親戚 被邀請去聽他的遺囑宣讀。 他想把所有的錢都留給你, 可是,他知道如果這樣做, 你的親戚們會一直騷擾你。 因此,他指望 他教過你所有你需要知道 關於謎語的資訊。 你的叔叔在遺囑留下了以下註記: 「我設計了一個謎題, 如果你們 100 個人能一起解答, 你們就平均分配我的遺產。 但是,如果你是第一個找到模式, 並解開謎語, 而不是經由一個個慢慢細算, 你將會得到全部的遺產。 祝你好運。」 律師帶你和你的 99 個親戚 去一座公寓裡的密室, 裡面有 100 個櫃子, 每個藏有一個字。 他解釋: 「每個親戚會分配到 1 至 100 中一個數字。 一號繼承人會打開所有櫃子, 之後,二號繼承人會把 每個 2 的倍數的櫃子關上。 三號繼承人會把 每個 3 的倍數的櫃子的狀態反轉, 明確地說, 如果本來是開著,她會關上它, 但如果本來是關著,她會打開它。 這方式會繼續,直到你們 100 個人都做完。 最後保持開著的櫃子裡的字 會幫助你破解保險箱密碼。」 在你表哥 Thaddeus 開始排隊之前, 你驅前告訴律師 你知道哪幾個櫃子最後仍然開著。 但是,如何知道的? 如果你想自己找出答案, 你可以現在暫停影片! 答案揭曉:3 答案揭曉:2 答案揭曉:1 關鍵是要瞭解一個櫃子被觸碰的次數 等於櫃子編號的因子數目。 例如,在 6 號櫃子, 第 1 個人會打開, 第 2 個人會把它關上, 第 3 個人會再打開, 第 6 個人會把它關上。 數字 1、2、3、6 都是 6 的因子, 所以當櫃子編號有偶數個因子時, 最後會保持關著, 而當它有奇數個因子時, 它會保持開著。 大部分的櫃子編號都有偶數個因子, 這是合理的,因為因子本來就是配對。 事實上,只有奇數個因子的櫃子編號 都是完全平方數, 因為那些有一個因子是自己相乘等於櫃子編號。 以 9 號櫃子為例,一號繼承人會打開它, 三號會關上它, 而九號會打開它。 3 x 3 = 9, 但 3 只能被算一次。 所以,完全平方數的櫃子 最後都會保持打開。 你知道這 10 個櫃子就是答案, 所以你立刻打開它們,並讀裡面的字: 「密碼是首五個只被觸碰兩次的櫃子。」 你知道只被觸碰兩次的櫃子 必須是質數, 因為每個只有兩個因子: 1 和那數字本身。 所以密碼是 2 - 3 - 5 - 7 - 11。 那個律師帶你到保險箱, 你聲明了你的遺產權。 可惜你的親戚 一直忙於惡劣地彼此對待, 以致無法專注於你古怪叔叔的謎語。