#include<iostream>
#include<cstdio>
using namespace std;
long a[500005],m,mo,n,i;
long long t[15];
int main()
{
cin>>m>>n;
for(i=0;i<=n-m;i++)
a[i+1]=i+m;
for(i=1;i<=n-m+1;i++)
{
while(a[i]!=0)
{
mo=a[i];
a[i]/=10;
t[mo]++;
}
}
for(i=0;i<=9;i++)
cout<<t[i]<<' ';
return 0;
}
#include<algorithm>
using namespace std;
int a[500001];
int main()
{
int m,n;
int b;
int c0=0,c1=0,c2=0,c3=0,c4=0,c5=0,c6=0,c7=0,c8=0,c9=0;
cin>>m>>n;
for(int i=0;i<n-m+1;i++)
{
a[i]=m+i;
}
for(int i=0;i<n-m+1;i++)
{
while(a[i]!=0)
{
b=a[i]%10;
if(b==0)
{
c0++;
}
if(b==1)
{
c1++;
}
if(b==2)
{
c2++;
}
if(b==3)
{
c3++;
}
if(b==4)
{
c4++;
}
if(b==5)
{
c5++;
}
if(b==6)
{
c6++;
}
if(b==7)
{
c7++;
}
if(b==8)
{
c8++;
}
if(b==9)
{
c9++;
}
a[i]=a[i]/10;
}
}
cout<<c0<<" "<<c1<<" "<<c2<<" "<<c3<<" ";
cout<<c4<<" "<<c5<<" "<<c6<<" "<<c7<<" ";
cout<<c8<<" "<<c9<<" "<<endl;
return 0;
}
#include <algorithm>
#include <iostream>
using namespace std;
int a[500001];
int main()
{
int m, n;
int b;
int c0 = 0, c1 = 0, c2 = 0, c3 = 0, c4 = 0, c5 = 0, c6 = 0, c7 = 0, c8 = 0, c9 = 0;
cin >> m >> n;
for (int i = 0; i < n - m + 1; i++)
{
a[i] = m + i;
}
for (int i = 0; i < n - m + 1; i++)
{
while (a[i] != 0)
{
b = a[i] % 10;
if (b == 0)
{
c0++;
}
if (b == 1)
{
c1++;
}
if (b == 2)
{
c2++;
}
if (b == 3)
{
c3++;
}
if (b == 4)
{
c4++;
}
if (b == 5)
{
c5++;
}
if (b == 6)
{
c6++;
}
if (b == 7)
{
c7++;
}
if (b == 8)
{
c8++;
}
if (b == 9)
{
c9++;
}
a[i] = a[i] / 10;
}
}
cout << c0 << " " << c1 << " " << c2 << " " << c3 << " ";
cout << c4 << " " << c5 << " " << c6 << " " << c7 << " ";
cout << c8 << " " << c9 << " " << endl;
return 0;
}
```