probability.nPr
Calculates ordered permutations P(n, r) as exact integer strings for n up to 20,000, with no rounding. Use for ordered selections; use combinations for unordered choices.
Instructions
순열 P(n, r) = n!/(n-r)!을 정확한 정수 문자열로 반환한다. n, r 은 0 이상 정수(r ≤ n, n 상한 20000)이며 반올림은 없다. 순서를 구분하지 않는 선택에 쓰면 r! 배 크게 나오므로 그 경우는 nCr 을 쓴다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | ||
| r | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _meta | No | 서버가 붙이는 영수증(integrity), 엔진, 힌트 | |
| trace | Yes | 계산 근거(tool, formula, inputs, steps, output) | |
| result | Yes |