Олимпиадный тренинг

Задача 27315. Chess board


Задача

Темы: Сочетания
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