for (int i = 2; i <= n; i++) if (n % i == 0) { cnt++; while (n % i == 0) n /= i; }
求大佬帮忙看看代码正确性(还有时间复杂度是多少(?))