|
|
SPOJ Problem Set (challenge)
8672. Distributing the balls
Problem code: BALLS
|
In this task you have compute the number of ways we can distribute A balls into B cells with with every cell having at-least one ball.
Input
The inputs A and B are given in a single line separated by a blank,the inputs are terminated by EOF.
Output
Output the answer modulus 247383691.
Score
Score is the length of your code.
Example
Input: 12 4 6 3
Output:
14676024 540
Constraints
- Every A and B can be distinguishable.
- [math]0 \le A \le 1000000 [\math]
- [math]0 \le B \le 100 [\math]
| Added by: | .:: Debanjan ::. |
| Date: | 2011-03-28 |
| Time limit: | 0.5s-10s |
| Source limit: | 1000B |
| Languages: | All |
| Resource: | Own problem |
|
|
|
|