Mango Distribution
Given a number of mangoes and number of persons. Find the number of ways to distribute identical mangoes among identical persons.
285
Input Specification:
Input1: the number of mangoes
35382
input2: the number of persons
133
Output Specification:
1008
Return the number of ways to distribute identical mangoes among identical persons
Example 1:
input1: 2
input2: 2
Output: 3
Explanation:
285
All possible distributions of 2 identical mangoes to 2 identical persons are (1,1),(2,0) and (0,2). Hence the output is 3
Write a code in python 3
Pranali Meshram is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1