12345678910111213141516171819202122 |
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int st,ed,t,temp;
- cin>>st>>ed;
- int a[10]={0};
- for(int i=st;i<=ed;i++){
- t=i;
- while(t){
- temp=t%10;
- a[temp]++;
- t/=10;
- }
- }
- for(int i=0;i<=9;i++){
- if(i) cout<<" ";
- cout<<a[i];
- }
- cout<<endl;
- return 0;
- }
|