#include <bits/stdc++.h> #define ll long long using namespace std; int a,b,cnt=0; int check(int x){ int f[15]; int ln=0; int xx1=x; memset(f,0,sizeof(f)); while(xx1 != 0){ ln++; xx1/=10; } for(int i=0;i<=ln-1;i++){ xx1 = x; while(xx1 != 0){ // cout<<i<<' '; if(xx1%10 == i){ if(f[i] == 0) f[i]++; else return 0; } xx1 /= 10; } } for(int i=0;i<=ln-1;i++){ // cout<<f[i]<<" "; if(f[i] == 0) return 0; } // cout<<x<<" "; return 1; } int main(){ ios::sync_with_stdio(false); cin.tie(0);cout.tie(0); cin>>a>>b; for(int i=a;i<=b;i++){ // cout<<check(i)<<"\n"; if(check(i)) cnt++; } cout<<cnt; return 0; } /*/ ÐÒÔËÊý×Ö£¨£¿ /*/