返回题库

100 个开关

100 Switches

专题
Brainteaser / 脑筋急转弯
难度
L2

题目详情

一个房间里有 100 个开关,每个开关最初都是向左翻转的。第一个人进入房间并打开每个开关。第二个人进入房间并打开所有其他开关。第三个人进入并翻转每三个开关。这个过程一直持续到第 100 个人按动第 100 个开关为止。有多少个开关向右转?

There are 100 switches in a room and each of them are initially flipped to the left. The first person enters the room and flips every switch. The second person enters the room and flips every other switch. The third person enters and flips every third switch. The process continues until the 100-th person has flipped every 100-th switch. How many switches are turned to the right?

解析

如果 xxii 的因子,则 ii-th 开关由人 xx 翻转。因此,如果第 ii 个开关具有奇数个因子,则该开关将向右翻转。因数为奇数的数称为完全平方数。由于从 1 到 100 有 10 个完全平方数,因此有 10 个向右翻转的开关。


Original Explanation

The ii-th switch is flipped by person xx if xx is a factor of ii. Therefore, the ii-th switch will be flipped to the right if it has an odd number of factors. The numbers that have an odd number of factors are called perfect squares. Since there are 10 perfect squares from 1 to 100, there are 10 switches that are flipped to the right.