Last active
August 29, 2015 14:12
-
-
Save nothingrealhappen/044701ddaeadf82c6946 to your computer and use it in GitHub Desktop.
「Geek每日一题」2014.12.31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
这道题答案很多,主要考察最优算法。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
打印出1000以内的质数(质数,又称素数,指在大于1的自然数中,除了1和此整数自身外,无法被其他自然数整除的数(也可定义为只有1和本身两个因数的数)。)
同时做一个计数器 看谁打印1000以内的质数「需要计算的次数」最少
50以内质数样例:2、3、5、7、11、13、17、19、23、29、31、37、41、43、47