O(sqrt(n))
unordered_map<int, int> factors;//存储质因数,first为底数,second为次数
void divide(int x)
{
for (int i = 2; i <= x / i; i++)
{
while (x % i == 0)
{
x /= i;
factors[i]++;
}
}
if (x > 1)
{
factors[x]++;
}
}