Description: Count the number of prime numbers less than a non-negative number, n. 推断一个数是否是质数主要有下面几种方法: 1)直接用该数除于全部小于它的数(非0.1),假设均不能被它整除,则其是质数. 2)除以小于它一半的数.由于大于其一半必然是无法整除.假设均不能被它整除.则其是质数: 3)除以小于sqrt(a)的数,原因例如以下: 除了sqrt(a)之外,其它的两数乘积为a的,一定是比个比sqrt(a)小,…