如何 快速求一个数的质因数的个数
for(int i = 1; i <= 1000000; i++) cnt[i] = 2; cnt[1] = 1; for(int i = 2; i <= 1000000; i++){ for(int j = i+i; j <= 1000000; j += i) cnt[j]++; }
标签:log += [1] div highlight post blog for body
如何 快速求一个数的质因数的个数
for(int i = 1; i <= 1000000; i++) cnt[i] = 2; cnt[1] = 1; for(int i = 2; i <= 1000000; i++){ for(int j = i+i; j <= 1000000; j += i) cnt[j]++; }
标签:log += [1] div highlight post blog for body
原文地址:https://www.cnblogs.com/ccut-ry/p/8409965.html