func_code_string: #include <bits/stdc++.h>   using namespace std;   map<int, int> mp;   long long v[500000];   long long f[100005], p[100005];   bool chk(int n) {     while (n) {       int t = n % 10;       if (t == 4 || t == 7) {         n /= 10;       } else         return false;     }     return true;   }   void egcd(long long a, long long b, long long &x, long long &y) {     if (b == 0) {       x = 1;       y = 0;     } else {       egcd(b, a % b, x, y);       long long k = a / b;       k = x - k * y;       x = y;       y = k;     }   }   long long r(long long d) {     long long x, y;     egcd(d, 1000000007, x, y);     x %= 1000000007;     if (x < 0) x += 1000000007;     return x;   }   long long C(int a, int b) {     if (a == 0 || b == 0) return 1;     long long tmp = p[a] * r(p[b]);     tmp = ((tmp % 1000000007) * r(p[a - b])) % 1000000007;     return tmp;   }   int main() {     int n, k;     while (scanf( %d%d , &n, &k) != -1) {       int i, j;       int m = 0;       mp.clear();       for (i = 0; i < n; i++) {         int x;         scanf( %d , &x);         if (chk(x))           mp[x]++;         else           m++;       }       map<int, int>::iterator it;       int cnt = 0;       for (it = mp.begin(); it != mp.end(); it++) {         v[cnt++] = it->second;       }       memset(f, 0, sizeof(f));       f[0] = 1;       for (i = 0; i < cnt; i++) {         for (j = k; j - 1 >= 0; j--) {           f[j] = (f[j] + f[j - 1] * v[i]) % 1000000007;         }       }       long long ans = 0;       p[0] = 1;       for (i = 1; i <= n; i++) p[i] = (p[i - 1] * i) % 1000000007;       for (i = 0; i <= k && i <= m; i++) {         ans = (ans + f[k - i] * C(m, i)) % 1000000007;       }       printf( %I64d n , ans);     }     return 0;   }   