def perm(n):
"""Permutations.
n = number of elements
Notation: P
n
All elements included: yes
Can elements repeat: no
Order matters: yes
See: Number of ways there are to rearrange n elements.
Practical example: amount of numbers with 3 distinct digits.
Let the elements be: 1, 2, 3:
123, 132, 213, 231, 312, 321
"""
return factorial(n)
评论列表
文章目录