Algo: 6-character combination

jackylembush Posted messages 11 Status Membre -  
jackylembush Posted messages 11 Status Membre -
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.

3 réponses

jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   4 830
 
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
1
jackylembush Posted messages 11 Status Membre
 
Uh :D
the truth is that I didn't understand much there XD
I don't have an exceptional level in math
0