ROSALIND|Enumerating Gene Orders (PERM)
給定一正整數 n,求包含數字 1 到 n 的所有可能數列與其總數。
A permutation of length n is an ordering of the positive integers {1,2,…,n} . For example, π=(5,3,2,1,4) is a permutation of length 5.
Given: A positive integer n≤7 .
Return: The total number of permutations of length n , followed by a list of all such permutations (in any order).