func_code_string: #include <bits/stdc++.h>   using namespace std;   const double eps = 1e-7;   const int MX = 1111 * 1111 * 2;   int n, m;   const double pi = acos(-1.0);   int len, res[MX], mx;   struct Complex {     double r, i;     Complex(double r = 0, double i = 0) : r(r), i(i){};     Complex operator+(const Complex &rhs) {       return Complex(r + rhs.r, i + rhs.i);     }     Complex operator-(const Complex &rhs) {       return Complex(r - rhs.r, i - rhs.i);     }     Complex operator*(const Complex &rhs) {       return Complex(r * rhs.r - i * rhs.i, i * rhs.r + r * rhs.i);     }   } va[MX], vb[MX], ve[MX], vc[MX];   void rader(Complex F[], int len) {     int j = len >> 1;     for (int i = 1; i < len - 1; ++i) {       if (i < j) swap(F[i], F[j]);       int k = len >> 1;       while (j >= k) {         j -= k;         k >>= 1;       }       if (j < k) j += k;     }   }   void FFT(Complex F[], int len, int t) {     rader(F, len);     for (int h = 2; h <= len; h <<= 1) {       Complex wn(cos(-t * 2 * pi / h), sin(-t * 2 * pi / h));       for (int j = 0; j < len; j += h) {         Complex E(1, 0);         for (int k = j; k < j + h / 2; ++k) {           Complex u = F[k];           Complex v = E * F[k + h / 2];           F[k] = u + v;           F[k + h / 2] = u - v;           E = E * wn;         }       }     }     if (t == -1)       for (int i = 0; i < len; ++i) F[i].r /= len;   }   void Conv(Complex a[], Complex b[], int len) {     FFT(a, len, 1);     FFT(b, len, 1);     for (int i = 0; i < len; ++i) a[i] = a[i] * b[i];     FFT(a, len, -1);     for (int i = 0; i < len; ++i) a[i].r = (a[i].r > 0.5);   }   void init(Complex *a, Complex *b) {     for (int i = 0; i < len; i++) a[i].i = 0, a[i].r = b[i].r;   }   void _init(Complex *a) {     for (int i = 0; i < len; i++) a[i].i = 0;   }   void Out(int a) {     if (a > 9) Out(a / 10);     putchar(a % 10 +  0 );   }   void print(Complex *a) {     for (int i = 0; i < len; i++) printf( %d  , (int)(a[i].r + 0.5));     cout << endl;   }   void gao() {     len = 1;     while (len < mx) len <<= 1;     ve[0].r = 1;     while (m) {       if (m & 1) {         init(vc, va);         Conv(ve, va, len);         _init(ve);         init(va, vc);         if (m == 1) break;       }       init(vb, va);       Conv(va, vb, len);       _init(va);       m >>= 1;     }     for (int i = 0; i < len; ++i) res[i] = ve[i].r + 0.5;     for (int i = 0; i < len; i++)       if (res[i]) Out(i), putchar(   );     cout << endl;   }   int main() {     while (cin >> n >> m) {       int maxn = 0;       for (int i = 0; i < n; i++) {         int x;         scanf( %d , &x);         maxn = max(maxn, x);         va[x].r = 1;         va[x].i = 0;       }       mx = maxn * m + 1;       gao();     }     return 0;   }   