given a number of mangoes and number of persons. Find the number of ways to distribute identical mangoes among identical persons in python
# we take into account the fact that giving no mango to anyone
# is a way to distribute 0 mangoes
q_mango = int(input ('Enter the amount of mango: '))
q_people = int(input ('Enter the number of people: '))
print('Number of ways to distribute an equal amount of mangoes: ',
q_mango//q_people + 1)
Comments
Leave a comment