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个人一起回答, 就100个人均分我的钱。 但是,如果你是第一个 找到答案解决问题的人 而没有用暴力跑腿法, 你将会独享我的所有遗产。 祝你好运。” 律师把你和99个亲戚 带到了宅第的密室。 这有100个储藏柜, 每个柜子里藏着一个词。 他说:“ 每个亲戚被分发1到100里的一个数字。 1号继承人要打开每个储藏柜。 2号将关上偶数号码的储藏柜。 3号改变整除3的储藏柜的状态, 如果储藏柜开着,那就关上, 如果储藏柜关着,那就打开。 100个人都按这个规律执行。 最终开着的柜子里的词, 会帮你打开保险箱。 在1号继承人开始打开柜子之前, 你就大步向前告诉了律师哪些柜子会是开着的。 怎么做到的呢? 如果你想自己想,就暂停视频! 3秒后出答案 2秒后出答案 1秒后出答案 关键是算出每个柜子被改变状态的次数 是和柜子号码的因子数相同的。 比如对于6号柜子, 1号继承人把它打开, 2号把它关上, 3号把它打开, 最后6号把它关上。 1,2,3,6就是6的四个因数。 所以如果一个柜子有偶数个因数, 它最后就是关着的, 如果一个柜子有奇数个因数, 它就是开着的。 大多数柜子有偶数个因子因数, 因为因数自然是成对出现的。 实际上,仅有的几个有奇数个因数的柜子 是完全平方柜^_^ 因为它们有一个因数自己乘自己得到柜号 对于9号柜子,1号继承人把它打开, 3号把它关上, 最后9号把它打开。 3 x 3 = 9, 但是3只能算一个因数。 因此,每个完全平方柜最后是开着的。 你知道了这十个柜子就是答案, 所以你立刻打开了它们。里面写着: “保险箱的密码是前五个只被碰了两次的柜子。” 你发现满足条件的是质数柜 因为它们每个只有两个因数: 1和它本身。 所以密码是2-3-5-7-11。 律师把你带到保险箱前, 你获得了你叔叔的遗产。 你的亲戚光顾着互相恶心了 没注意你的怪叔叔出的题