Dynamic Programming
2787. Ways to Express an Integer as Sum of Powers
Given n and x, count the ways to express n as a sum of the x-th powers of distinct positive integers: n = i1^x + i2^x + … with pairwise-distinct bases. Answer modulo 1e9+7. This is a classic "count…
Loading…