func_code_string: #include <bits/stdc++.h>   using namespace std;   inline int read() {     register int x = 0, f = 1;     register char c = getchar();     while (c <  0  || c >  9 ) {       if (c ==  - ) f = -1;       c = getchar();     }     while (c >=  0  && c <=  9 ) x = x * 10 + c - 48, c = getchar();     return x * f;   }   namespace Graph {   int head[1000005], cnt;   struct edge {     int v, next, w;   } e[1000005 << 1];   inline void add(int u, int v, int w) {     e[++cnt] = (edge){v, head[u], w}, head[u] = cnt;   }   }  // namespace Graph   int n, m, k, Ans, fac, sum, g[1000005];   char c[1000005];   inline int qpow(int a, int b) {     int r = 1;     while (b) {       if (b & 1) r = 1ll * a * r % 1000000007;       a = 1ll * a * a % 1000000007, b >>= 1;     }     return r;   }   signed main() {     Ans = n = read(), k = read(), g[0] = fac = 1;     for (register int i = (1); i <= (n); ++i) {       sum = (sum + g[i - 1]) % 1000000007;       if (i > k) sum = (sum - g[i - k - 1] + 1000000007) % 1000000007;       g[i] = 1ll * sum * qpow(i, 1000000007 - 2) % 1000000007;       Ans = (Ans - g[i - 1] + 1000000007) % 1000000007;       if (i != 1) fac = 1ll * fac * (i - 1) % 1000000007;     }     cout << 1ll * fac * Ans % 1000000007;     return 0;   }   