做个智力题放松放松。
所有跟贴
·
加跟贴
·
新语丝读书论坛
送交者: forfun 于 2009-06-08, 12:39:30:
房间里有编号1-100的100个灯泡,起始状态都是关的。喊“1”,1的倍数编号的灯泡改变开关状态,即所有灯泡变亮。接着喊“2”,2的倍数编号的灯泡改变开关状态,即2,4,6,..., 100号灯泡变灭。如此喊下去一直到100。请问喊完一百后,哪些灯泡是亮的,哪些灯泡是关的?
1分钟内做出来的是博士后。
5分钟内做出来的是博士。
10分钟内做出来的是硕士。
20分钟内做出来的是学生。
一个小时内做出来的是文科生。
所有跟贴:
所有奇数灯都亮,所有偶数灯都灭,哪用得了什么程序?
-
ConeCell
(230 bytes)
2009-06-09, 11:04:27
(333600)
3呢?喊1时变亮,喊2时不变(3不是2的倍数),喊3时变灭。
-
forfun
(11 bytes)
2009-06-09, 13:36:42
(333646)
results
-
qtl
(1330 bytes)
2009-06-08, 13:05:46
(333413)
想了一会,原理是该数只能有双数重复的因子:
-
阮宗光
(129 bytes)
2009-06-08, 17:59:23
(333500)
单数个因子数的数。
-
forfun
(120 bytes)
2009-06-08, 22:02:34
(333517)
你好像没明白我的意思;再看看那几个因子排列 (无内容)
-
阮宗光
(0 bytes)
2009-06-08, 22:57:19
(333522)
你的说法结果都是对的。。。
-
forfun
(57 bytes)
2009-06-09, 07:59:08
(333554)
13:05:46-12:39:30>20 minutes.good student ^_^ (无内容)
-
catfish
(0 bytes)
2009-06-08, 15:35:24
(333477)
应该O(100*sqrt(100)),无需O(100**2)
-
阮宗光
(103 bytes)
2009-06-08, 13:59:50
(333431)
yes, this will optimize the program a lot. (无内容)
-
qtl
(0 bytes)
2009-06-08, 14:04:03
(333434)
有时候太优化了普通大众反而不好理解。你的程序直观易懂 (无内容)
-
foresight
(0 bytes)
2009-06-08, 14:35:56
(333447)
您有没有空在这里列一下抽奖得车的问题
-
foresight
(113 bytes)
2009-06-08, 13:15:54
(333417)
here you go
-
qtl
(1200 bytes)
2009-06-08, 13:52:58
(333429)
What if the host happens to get a car?
-
wasguru
(48 bytes)
2009-06-08, 19:52:44
(333504)
假定主持人会说:对不起,你选错了。
-
qtl
(136 bytes)
2009-06-09, 03:40:54
(333529)
如果你说的“主持人知道答案”是指主持人知道答案故意去开没车的,
-
foresight
(42 bytes)
2009-06-09, 11:27:01
(333610)
谢谢。 看来主持人事先知不知道对结果没影响 (无内容)
-
foresight
(0 bytes)
2009-06-08, 14:02:53
(333432)
看来该有人去改一下这个WIKI条目,省得再误导别人
-
foresight
(197 bytes)
2009-06-08, 15:28:19
(333472)
Obviously, the wiki is right and you are wrong (无内容)
-
Pepe_Le_Pue
(0 bytes)
2009-06-08, 17:08:52
(333497)
你说说怎么Obviously? (无内容)
-
foresight
(0 bytes)
2009-06-08, 17:27:18
(333498)
其“解答”中分析明显不对,把四种可能非要说成三种 (无内容)
-
foresight
(0 bytes)
2009-06-08, 15:30:06
(333474)
原来主持人不知道,那么答案可能不一样。 (无内容)
-
qtl
(0 bytes)
2009-06-08, 13:24:55
(333420)
如果主持人不知道换不换一样。菲菲给的wiki里的答案是错的。
-
forfun
(48 bytes)
2009-06-08, 13:27:13
(333422)
很早以前也是在这里写过一个
-
qtl
(34 bytes)
2009-06-08, 13:23:03
(333419)
怎样才能找到你的程序? (无内容)
-
foresight
(0 bytes)
2009-06-08, 13:26:48
(333421)
你有885贴,一个个找太累了,有连接吗? (无内容)
-
foresight
(0 bytes)
2009-06-08, 13:31:07
(333423)
的程序,以正视听 :) (无内容)
-
foresight
(0 bytes)
2009-06-08, 13:22:13
(333418)
恩,你是个学计算机的。。 赞!
-
forfun
(45 bytes)
2009-06-08, 13:10:06
(333414)
唉,看来你是个语文一向不及格的理科博士后。。
-
forfun
(4 bytes)
2009-06-08, 12:54:26
(333406)
似乎1-10的平方数亮着。不是10吗? (无内容)
-
whatistrue
(0 bytes)
2009-06-08, 12:59:55
(333409)
嗯,看来你至少是个学士。。
-
forfun
(10 bytes)
2009-06-08, 13:01:08
(333410)
怎么掉得这么快?btw,这个数几个数就出来了。应该是小学智力题? (无内容)
-
whatistrue
(0 bytes)
2009-06-08, 13:03:19
(333412)
10? :) 从1数到100好像不用1分钟。所以人人都是博士后?:) (无内容)
-
whatistrue
(0 bytes)
2009-06-08, 12:49:57
(333405)
数错了. :( (无内容)
-
whatistrue
(0 bytes)
2009-06-08, 12:55:25
(333407)
加跟贴
笔名:
密码:
注册笔名请按这里
标题:
内容: (
BBCode使用说明
)