# Problem 628. Book Club

A book club that has K members, as a group, have to read N books. Return how many different ways the members could read the books. All of the books must be read by at least one member of the group and all of the members must read one and only one book.

For Example, for K = 3 and N = 2, there are 6 ways

1. Member 1 reads book 1, Member 2 reads book 1, Member 3 reads book 2
2. Member 1 reads book 1, Member 2 reads book 2, Member 3 reads book 1
3. Member 1 reads book 1, Member 2 reads book 2, Member 3 reads book 2
4. Member 1 reads book 2, Member 2 reads book 1, Member 3 reads book 1
5. Member 1 reads book 2, Member 2 reads book 1, Member 3 reads book 2
6. Member 1 reads book 2, Member 2 reads book 2, Member 3 reads book 1

Note: all of the test cases use small values of n and k to allow for brute-force solutions.

### Solution Stats

25.47% Correct | 74.53% Incorrect
Last Solution submitted on Feb 25, 2023

Show comments

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!