Can anyone explain this last part of editorial, why we are using modulo inverse?
for (long long i = 0; i<x; i++)
{
vec[i] = (nOfDivisors*vec[i])%p;
vec[i] = (vec[i]*500000004)%p; // 500000004 is mod_inv(2,1000000007);
ans = (ans*(vec[i] + 1)) % p;
}