Counting permutations

Problem Name:
Counting permutations
Site:HackerEarth
Links:
Tags:
Problem setters: