P1655 Kid's Balls
Description
A kid recently became very fond of balls. One day, he took $N$ distinct balls out of his pocket and wants to put them into $M$ identical boxes, with at least one ball in each box. He wonders how many ways there are. He tried to write a program, but since he slacks off and only watches swimming coaches on Bilibili, he asks you for help.
Input Format
Multiple test cases. Each line contains two integers $N, M$.
Output Format
For each test case, output a single line with the number of ways.
Explanation/Hint
- For $20\%$ of the testdata, $N, M \leq 10$.
- For $100\%$ of the testdata, $1 \leq N, M \leq 100$, and there are at most $10$ test cases per test file.
Translated by ChatGPT 5