Algo: 6-character combination
jackylembush
Posted messages
11
Status
Member
-
jackylembush Posted messages 11 Status Member -
jackylembush Posted messages 11 Status Member -
Hello,
I am currently looking to find the total number of possible combinations, or at least their number, for a combination with 6 characters.
The characters are:
3 3 x 7 p 8
Having a little memory lapse on my math lessons :)
Thank you in advance.
I am currently looking to find the total number of possible combinations, or at least their number, for a combination with 6 characters.
The characters are:
3 3 x 7 p 8
Having a little memory lapse on my math lessons :)
Thank you in advance.
3 answers
-
Hello,
You need to use factorials.
The arrangement of p in n is expressed as:
nAp= n!/[p! × (n-p)!]
NB: 0! = 1
Here is an example in PHP:
https://codes-sources.commentcamarche.net/source/100161-php-liste-des-combinaisons-possibles-somme
--
Best regards,
Jordane