Add C++ implementation for composite k case in `Finding Power of Factorial Divisor` article
Author: tmvalijib24Created Jul 9, 2026Updated Jul 9, 2026
Description
The article explains the algorithm for handling composite k in the "Finding Power of Factorial Divisor" problem, but it does not provide a complete C++ reference implementation.
It would be helpful to include a function that:
- Prime-factorizes
k. - Uses
fact_pow()to compute the exponent of each prime factor inn!. - Returns the minimum exponent after accounting for each factor's multiplicity.
Adding this implementation would make the article more practical and consistent with other cp-algorithms articles that include complete reference code.
Source: cp-algorithms/cp-algorithms