if some n and k is given , we need to find number of factors of n , which are greater than k. i.e. if n= 14, k=5, then ans should be 2, i.e. 7 and 14. I know a sqrt(n) solution , can i improve my solution ? edit : i have a constant k and many different n.
2026-03-27 04:35:15.1774586115
find number of factors of n , which are greater than k.
309 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
If $n=\prod_{i=1}^m p_i^{a_i}$ with $a_i\in\Bbb Z_+$, then the number of all divisors of $n$ is $\prod_{i=1}^m(a_i+1)$. We need to subtract from this the number of divisors $\le k$. To this end, we enumerate these:
All variables below must be of a type capable of holding an integer in the range $0,\ldots,k$. The $k$ entries $D[0],\ldots, D[k-1]$ of array $D$ must also be of this type. Only $i$ and $a'$ could theoretically take larger values, if some of the given values $m$ and $a_i$ are $>k$.