/* p1.cpp This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ //guzixi ak csp-j //guzixi ak csp-s //guzixi ak noip //guzixi ak shenxuan //guzixi ak noi //guzixi ak wc //guzixi ak ctsc //guzixi ak ioi //guzixi ak xxywl //while(1) rp+=1145141919810; #include <bits/stdc++.h> //#include <bits\stdc++.h> using namespace std; int m[15]={0,1,2,3,4,5,6,7,8,9},n[15]; int a,b,c,s; bool f; void cal(int x){ memset(n,0,11*4); c=0; f=1; while(x>0){ n[c++]=x%10; x/=10; } } int main(){ cin>>a>>b; for(int i=a;i<=b;i++){ cal(i); sort(n,n+c); for(int j=0;j<c;j++)if(m[j]!=n[j]){ f=0; break; } if(f)s++; } cout<<s; return 0; } void mian(); void man(); //guzixi luogu uid = 1124559, welcome //love ccf, love jiangsu //ac p1 at 13:25