LightOJ – Arrange the Numbers

Problem Name: Arrange the Numbers
Judge: LightOJ
Algorithms & DS: Combinatorics, De-Arrangement