func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MOD = 1000000007;   int N, M, K;   long long F[1111][1111], T[1111], G[111111];   map<int, int> P;   inline long long Pow(long long A, int B) {     long long Ret = 1;     for (; B; B >>= 1) {       if (B & 1) {         Ret = (Ret * A) % MOD;       }       A = (A * A) % MOD;     }     return Ret;   }   int main(int argc, char *argv[]) {     for (int l = 1; l < 10; l++) {       for (int i = 0; i < 1 << l; i++) {         int x = 0;         for (int k = 0; k < l; k++) {           x *= 10;           if (i & (1 << k)) {             x += 4;           } else {             x += 7;           }         }         P[x] = ++M;       }     }     scanf( %d%d , &N, &K);     for (int i = 0, x; i < N; i++) {       scanf( %d , &x);       if (P.find(x) != P.end()) {         T[P[x]]++;       } else {         T[0]++;       }     }     N = T[0];     F[0][0] = 1;     for (int i = 1; i <= M; i++) {       for (int j = 0; j <= M; j++)         if (F[i - 1][j]) {           F[i][j] = (F[i][j] + F[i - 1][j]) % MOD;           F[i][j + 1] = (F[i][j + 1] + F[i - 1][j] * T[i]) % MOD;         }     }     G[0] = 1;     for (int i = 1; i <= N; i++) {       G[i] = (G[i - 1] * (N + 1 - i)) % MOD;       G[i] = (G[i] * Pow(i, MOD - 2)) % MOD;     }     long long Ret = 0;     for (int i = 0; i <= M && i <= K; i++) {       Ret += F[M][i] * G[K - i];       Ret %= MOD;     }     printf( %I64d n , Ret);     return 0;   }   