T
T
tj572019-10-21 21:43:10
Prolog
tj57, 2019-10-21 21:43:10

How to solve the problem of selecting terms for the desired sum in Prolog?

You need to calculate how many ways you can choose the amount equal to 18, using the following terms: 10,6,1. At the same time, the same terms in a different order are different ways (for example, 10+6+1+1 and 10+1+6+1).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2019-10-23
@begemot_sun

You need to read about Newton's binomial. There is no need for a prologue.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question