#include <bits/stdc++.h> using namespace std; int main() { int a,b,size; int cnt=0; cin >> a >> b; for(int i=a;i<=b;i++) { vector <int> a(9,0); int y,x=i; size=0; while(x!=0) { y=x%10; x=x/10; a[y]=1; size++; } x=-1; for(int j=0;j<size;j++) { if(a[j]==0) { x=0; } } if(x==-1) { cnt++; } } cout << cnt << endl; return 0; }