#K82062. Permutation Calculation

    ID: 35892 Type: Default 1000ms 256MiB

Permutation Calculation

Permutation Calculation

You are given two integers n and k (with 0 ≤ k ≤ n) and you need to compute the number of permutations of n elements taken k at a time.

The answer is given by the formula: \(P(n,k)=\frac{n!}{(n-k)!}\). This formula represents the number of ordered arrangements when selecting k elements from a set of n distinct elements.

For example, when n = 5 and k = 3, the calculation is:

P(5,3) = 5 * 4 * 3 = 60

Your task is to read the two numbers from standard input and output the computed number of permutations to standard output.

inputFormat

The input consists of a single line with two integers n and k separated by space.

Constraints: 0 ≤ k ≤ n.

outputFormat

Output the number of permutations \(P(n,k)=\frac{n!}{(n-k)!}\) as a single integer.

## sample
5 3
60