排列数计算器

P(n,r) = n! / (n−r)!

Compute the number of permutations P(n, k) without repetition.

📐 计算公式
排列数与组合数(本页代码口径):排列数 P(n,r)=n×(n−1)×…×(n−r+1)(连乘实现);组合数 C(n,r)=P(n,r)÷r!;r!=1×2×…×r(连乘实现)。校验:n、r 各自四舍五入取整并截断至不超过 1000;r>n 时 r 自动取 n(静默钳制)。判据:无固定分级,输出按千分位格式化整数显示,n=r 时 P=n!、C=1。

从 n 个元素取 r 个的排列数。

📌 计算说明
  • P(10,3) = 720。
  • 与顺序有关。

📚 深度解析:排列 P(n,k)

💡 常见使用场景

排座位
10 个人选前 3 个领奖座位,排列数 P(10,3)=10×9×8=720。每换一个座位顺序都算不同结果。
全排列
n 个物品全排列为 n!=n×(n-1)×…×1;3 本书排架上 = 3!=6 种。

❓ 常见问题(FAQ)

P(n,k) 公式是什么?
P(n,k)=n!/(n-k)!,即从 n 开始连乘 k 个数。例 P(10,3)=10!/7!=10×9×8。
什么时候用全排列 n!?
当 k=n(全部排完)时 P(n,n)=n!。只要所有物品都参与排序就用全排列。

Formula & Standard References

Item Formula / Note Source / Standard
Permutation countP(n,k) = n! ÷ (n−k)!, ordered arrangementBasic counting definition
Full permutationsn! orderings; 0! = 1 by conventionFactorial convention
Permutations with repetitionn^k with replacement; multiset n! ÷ (n1!·n2!·…)Multiplication principle
Circular arrangements(n−1)! circular arrangements, rotations identicalClassic circular-counting result