derangement_calc
Read-onlyIdempotent
Count derangements—permutations with no fixed points—for a given size and optionally list every valid arrangement when enumeration is enabled.
Instructions
Count and optionally enumerate derangements (permutations with no fixed points).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | Size of permutation (1-20) | |
| enumerate | No | List all derangements (n <= 8) |