-->
当前位置:首页 > 题库

PROGRAMMING:integer partition

Luz5年前 (2021-05-10)题库448
Given an integer n, it will be unordered split into the largest number of K fraction, (n, K does not exceed 100)
Requirement: all splitting schemes are not repeated.
For example, when n = 4 and K = 4, there are five splitting schemes
```
(1)4=1+1+1+1
(2)4=1+1+2
(3)4=1+3
(4)4=2+2
(5)4=4
```
###Input format:
Enter a set of integers n, K for each line, and end the input when the keyboard terminator ^ Z or file terminator EOF is encountered.
###Output format:
Output the number of splitting schemes for each group by row.
###Input example:
```in
4,4
5,4
```
###Output example:
```out
five
six
```







answer:If there is no answer, please comment