Permutation problem - MarisaOJ: Marisa Online Judge

Permutation problem

Time limit: 1000 ms
Memory limit: 256 MB
You are given an integer $k$. Count the number of permutation $P$ of length $n$ that for every $1 \le i \le k$, $P_i \neq i$. ### Input - A single line contains 2 integers $n, k$. ### Output - Print the answer, modulo $10^9+7$. ### Constraints - $1 \le m \le n \le 10^5$. ### Example Input: ``` 3 2 ``` Output: ``` 3 ```