#include<iostream> #include<cstdio> #include<cmath> #define maxn 100010 #define ll long long usingnamespacestd;
constint p = 1000000007;
int n, m;
structDiv_hash { int n, sn; bool f;
voidinit(int _n){ n = _n; sn = sqrt(n); }
intget(int x){ return x <= sn ? x : sn * 2 - n / x + 1; } } _;
ll f[maxn][30]; ll dfs(int n, int d){ if (d == m) return1; if (~f[_.get(n)][d]) return f[_.get(n)][d]; ll ans = 0, k = 1; for (ll l = 2, r; l <= n; l = r + 1) { r = n / (n / l); ll sum = 0, la = l; while ((1 << k) < l) ++k; while ((1 << k) <= r) { sum += k * ((1 << k) - la + 1); la = (1 << k) + 1; ++k; } sum = (sum + k * (r - la + 1)) % p; ans = (ans + sum * dfs(n / l, d + 1)) % p; } return f[_.get(n)][d] = ans; }