Marks :10
: 6 | : 0
Given N identical candles, find the number of ways to distribute them among K kids so that there is no kid with more than M candles.
Output the answer modulo 1e9+7.
Input consists of 3 space separated integers, N (1 <= N <= 1e5) , K (1 <= K <= 1e5) and M (1 <= M <= 1e5).
Output a single integers, the number of ways to distribute modulo 1e9+7.
3 2 2
2
1000 1000 1000
36237869
There can be 2 ways for distributing, (1 , 2) and (2 , 1).
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.