Rosetta Problems

~K Perm Counting

https://atcoder.jp/contests/agc005/tasks/agc005_d