Rosetta Problems

Permutation Counting 2

https://marisaoj.com/problem/518