Chef and Power SOLUTIONS CHEF1004

Chef and Power SOLUTION

Locate the quantity of ways that a given number, X, can be communicated as the total Ntof the forces of exceptional, regular numbers. 

For instance, if X=15 and N=2, we need to discover all mixes of one of a kind squares signifying 15. The main arrangement is 22+32+12+12. 

 

Info: 

The main line contains a whole number X 

The subsequent line contains a whole number N. 

 

Yield: 

Yield a solitary whole number, the quantity of potential blends caclulated. 

 

Limitations 

1≤X≤1000 

2≤N≤10 

 

Test Input: 

10 

 

Test Output: 

1

Leave a Comment

close
error: Content is protected !!