Module: Combinations


Problem

3 /3


Chess board

Problem

It is required to find the number of ways to place NxN K rooks on the chessboard so that they do not attack each other. All rooks are considered equal.
 
Input
The input file contains natural numbers N and K (\(1 <= N, K <= 8 \)).
 
Output
Output a single integer - the answer to the problem.
 

 

Examples
# Input Output
1 8 8 40320