#include<bits/stdc++.h> using namespace std; int main() { int count[10]={0},M,N,t; while(scanf("%d %d", &M, &N)!=EOF) { for(int i=M; i<=N; i++) { t=i; while(t!=0) { count[t%10]++; t/=10; } } for(int i=0; i<10; i++) { if(i==9) cout<<count[i]<<endl; else cout<<count[i]<<" "; count[i]=0; } } } |
Double click to view unformatted code.