func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long INF = 0x1fffffffffffffff;   const double INFD = 1e20;   const double EPS = 1e-9;   const double PI = atan(1) * 4;   const long long M = 998244353;   long long mod(long long x) { return ((x % M) + M) % M; }   long long add(long long a, long long b) { return mod(mod(a) + mod(b)); }   long long sub(long long a, long long b) { return mod(mod(a) - mod(b)); }   long long mul(long long a, long long b) { return mod(mod(a) * mod(b)); }   long long power(long long b, long long e) {     long long ans = 1;     while (e > 0) {       if (e % 2) ans = mul(ans, b);       b = mul(b, b);       e /= 2;     }     return mod(ans);   }   long long gcd(long long a, long long b) {     for (; b > 0; swap(a, b)) a %= b;     return a;   }   long long extended_euclid(long long a, long long b, long long &x,                             long long &y) {     long long xx = y = 0;     long long yy = x = 1;     while (b) {       long long q = a / b;       long long t = b;       b = a % b;       a = t;       t = xx;       xx = x - q * xx;       x = t;       t = yy;       yy = y - q * yy;       y = t;     }     return a;   }   long long inv(long long a) {     long long x, y;     long long d = extended_euclid(a, M, x, y);     if (d > 1) return -1;     return mod(x);   }   long long scan() {     long long r;     scanf( %lld , &r);     return r;   }   void scanstr(char *buf) { scanf( %s , buf); }   int main() {     long long n = scan();     vector<long long> a(n);     for (long long i = 0; i < n; ++i) {       a[i] = scan();     }     sort(a.begin(), a.end());     vector<long long> pfs(n + 1, 0);     for (long long i = 0; i < n; ++i) pfs[i + 1] = add(pfs[i], a[i]);     long long q_inv = inv(n);     for (long long i = 1; i < n; ++i) {       long long segcount = (i <= n / 2) ? i : (n - i);       long long ballcount = n - i;       long long q = ballcount / segcount;       long long r = ballcount % segcount;       long long ans = mul(q + 1, pfs[r]);       for (long long j = 1; j < q + 1; ++j) {         long long cur = mul(             q + 1 - j, sub(pfs[r + segcount * j], pfs[r + segcount * (j - 1)]));         ans = add(ans, cur);       }       cout << mul(ans, q_inv) << endl;     }     cout << 0 << endl;     return 0;   }   