跳转到内容

This page is also in English.

Read it in English

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

permutations 函数

列表的所有排列。

怎么写

permutations(list)

list
列表。接受一个列表。

示例

  • permutations⁡([1,2,3])=(123132213231312321)\displaystyle \operatorname{permutations}(\left[ 1, 2, 3 \right]) = \begin{pmatrix} 1 & 2 & 3 \\ 1 & 3 & 2 \\ 2 & 1 & 3 \\ 2 & 3 & 1 \\ 3 & 1 & 2 \\ 3 & 2 & 1 \end{pmatrix}
    permutations([1, 2, 3])

    在求解器中,permutations([1, 2, 3]) 的结果是 [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]]。

    在求解器中打开