func_code_string: #include <bits/stdc++.h>   using namespace std;   int pos, ans, a[20], b[20], cnt[12];   bool check(int pos, bool Ls, bool Rs) {     if (pos == 0) return true;     if (!Ls && !Rs) return true;     int l = Ls ? a[pos] : 0, r = Rs ? b[pos] : 9;     for (int i = l; i <= r; i++)       if (cnt[i]) {         cnt[i]--;         if (check(pos - 1, Ls && i == l, Rs && i == r)) {           cnt[i]++;           return true;         }         cnt[i]++;       }     return false;   }   void dfs(int cur, int total) {     if (cur == 9) {       cnt[cur] = total;       ans += check(pos, 1, 1);       return;     }     for (int i = 0; i <= total; i++) {       cnt[cur] = i;       dfs(cur + 1, total - i);       cnt[cur] = 0;     }   }   int digit(long long x, int d[]) {     register int pos = 0;     if (x == 0) d[++pos] = 0;     while (x) {       d[++pos] = x % 10;       x /= 10;     }     return pos;   }   int main() {     long long l, r;     cin >> l >> r;     digit(l, a);     pos = digit(r, b);     ans = 0;     dfs(0, pos);     cout << ans;     return 0;   }   