#include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define int long long #define double long double typedef vector VI; typedef pair pii; typedef vector VP; typedef vector VS; typedef priority_queue PQ; templatebool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } templatebool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } #define fore(i,a) for(auto &i:a) #define REP(i,n) for(int i=0;i, greater > q2; int modpow(int a, int p) { if (p == 0) return 1; if (p % 2 == 0) { int halfP = p / 2; int half = modpow(a, halfP); return half * half % mod; } else { return a * modpow(a, p - 1) % mod; } } signed main() { cin.tie(0); ios::sync_with_stdio(false); int N, M; cin >> N >> M; cout << N << endl; if (M == 1)return 0; if (N & 1) { cout << (N / 2)*(N / 2 + 1) % mod << endl; } else { cout << (N / 2 - 1)*(N / 2 + 1) % mod << endl; } eFOR(i, 3, M) { int h = N / i; int r = N % i; int res = modpow(h, i - r); res *= modpow(h + 1, r); res %= mod; //res *= (h - 1); //res %= mod; cout << res << '\n'; } return 0; }