
UCloud云社区LeetCode 204 线性筛 计数质数
static public int CountPrimes(int n) { //buf 存放所有数据,默认全部为素数 bool[] buf = new bool[n]; //primeBuf 存放素数,这是有序的,从小到大。 int[] ...
static public int CountPrimes(int n) { //buf 存放所有数据,默认全部为素数 bool[] buf = new bool[n]; //primeBuf 存放素数,这是有序的,从小到大。 int[] ...