#include <bits/stdc++.h> using namespace std; int a,b,cnt; bool check(int n){ bool have[10]={0}; int c=0; while(n){ if(have[n%10]){ return false; }else{ have[n%10]=true; } n/=10; c++; } //cout<<"pass"<<endl; for(int i=0;i<c;i++){ if(!have[i]){ //cout<<"Failed"<<endl; return false; } //cout<<"pass "; } return true; } int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin>>a>>b; for(int i=a;i<=b;i++){ if(check(i)){ cnt++; } } cout<<cnt; return 0; }