Combinations with repetitions
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Find the number of ways to distribute identical objects across distinct locations, where each location can hold any number of objects.
Input
Two natural numbers and .
Output
Print the required number of ways modulo .
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 32
Acceptance rate 28%