BALLS - Distributing the 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.
The inputs A and B are given in a single line separated by a blank,the inputs are terminated by EOF.
Output the answer modulus 247383691.
Score is the length of your code.
- Every A and B can be distinguishable.
- [math]0 \le A \le 1000000 [\math]
- [math]0 \le B \le 100 [\math]
My submissions 15115055 (WA) and 15115136 (AC) are identical. Maybe some rare bug in SPOJ platform?
learned quite a few things while implementation:)
@Ouditchya Sinha: \le just means less than or equal to; [math] tags aren't used on SPOJ so it's unclear why the problem setter would write it that way.
Can anyone please clarify the constraints, they are not appearing properly in my Browser. Thank You. :)
(Tjandra Satria Gunawan)(æ›¾æ¯…æ˜†):
I know the formula but i'm getting wa... Is there any tricky test case?
Hallvard Norheim Bø:
@HWK: suddenly my solution worked! It still matches yours for all the example inputs you provided.
@.:: Debanjan ::.: Could you please say me where my solution 5231091 fails?