114514

chl2023 2023-11-11 11:12:53

#include <bits/stdc++.h>
#define endl "\n"
using namespace std;
const int MOD =1000000007;
int n,k,c=1,cc=1;
int main(){
	ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	//freeopen(".in","r",stdin);
	//freeopen(".out","w",stdout);
	cin>>n>>k;
	for(int i=1;i<=n-k+1;i++){
		c=1LL*c*i%MOD;
	}
	for(int i=1;i<=k;i++){
		cc=1LL*cc*i%MOD;
	}
	cout<<1LL*c*cc%MOD;	
	return 0;
}
//4.(n-k+1)!*k!
//5.c(k,n-k+1)
//6.c(n-1,k-1)