Answer the question
In order to leave comments, you need to log in
How many odd numbers can be made from the digits of 36941 if each digit can be used at most once?
How many odd numbers (one-digit, two-digit, three-digit, four-digit, five-digit) can be made from the digits of the number 36941 if each digit can be used no more than once?
A formula is needed to create an algorithm =) What I came to: the number cannot end in 6.4, I thought according to the permutation formula, but there the trouble with 4.6 I can’t figure out how to implement it with the formula.
Answer the question
In order to leave comments, you need to log in
It is necessary to use the placement formula =>
A (5.5) \u003d 120
A (5.4) \u003d 120
A (5.3) \u003d 60
A (5.2) \u003d 20
A (5.1) \u003d 5
And at the end the Amount A * 3/5 We get 195
And in the program, just at the beginning we look at the correctness of the digits, the number of digits, the number of odd ones, and then by recursion we reach the depth k (A(n-number in the set, k-to-digit number))
well, at the end we divide by the number of digits and multiply the number of odd
3 - single digits,
3*4 - two digits,
3*4*3 - three digits,
3*4*3*2 - four digits, 3*4
*3*2*1 - five digits.
There are 195 options in total.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question