应该O(100*sqrt(100)),无需O(100**2)
所有跟贴
·
加跟贴
·
新语丝读书论坛
送交者: 阮宗光 于 2009-06-08, 13:59:50:
回答:
results
由 qtl 于 2009-06-08, 13:05:46:
同找质数sieve方法类是:
i=1,100
j=1 until (i*j>100)
count(i*j)++
count even or odd
所有跟贴:
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)
加跟贴
笔名:
密码:
注册笔名请按这里
标题:
内容: (
BBCode使用说明
)