13. Arrangements of Distinct Items

Easy

The number of ways to arrange n distinct items in a row is:

n!=n(n1)(n2)1,0!=1n! = n(n-1)(n-2)\cdots 1, \qquad 0! = 1

Return n!n!.

solve(5)  ->  120

Sign in to write and run your own code.

Implement solve(...)