Find the number of ways that a given integer,
x
, can be expressed as the sum of the
N^(th)
powers of unique, natural numbers. For example, if
x=13
and
N=2
, we have to find all combinations of unique squares adding up to The only solution is
2^(2)+3^(2)
. Function Description Complete the power Sum function in the editor below. It should return an integer that represents the number of possible combinations. powerSum has the following parameter(s):
x
: the integer to sum to
N
: the integer power to raise numbers to Input Format The first line contains an integer
x
. The second line contains an integer
N
. Constraints
1<=x<=1000
2<=N<=10
Output Format Output a single integer, the number of possible combinations caclulated. Solve the problem in Python Programming Language