CodePudding user response:
The output 3 digits from 1 to 5, and this is not the same as the number of 3,CodePudding user response:
Look at the math permutation and combinationCodePudding user response:
Means exhaustive judgement bits from 111 to 444 10 one hundred different NumbersCodePudding user response:
# can understand
For I in range (123433) :
If '0' STR in (I) or '5' in the STR (I) or '6' in STR (I) or '7' STR in (I) or '8' STR in (I) or '9' in the STR (I) :
The continue
If len (the list (the set (the list (STR) (I))))!=3:
The continue
Print (I)
CodePudding user response:
First of all, the permutation and combination you should first clear, this is the premise,1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
Let you make up a three digits, 1000 cannot repeat, you can be as from the above three lines, each line take a composed of a number, from each one, believe that you read the introduction should be able to understand with a for loop, three lines together is to use the for nested, thinking becomes, the first thing you get 1 in the first line, respectively, to the other two lines in different number combination, after took up the get 2 from the first line, repeated, this is the whole piece of code execution logic,
I also is new come soon, the hope can help you,
CodePudding user response: