#include<bits/stdc++.h> using namespace std; int op[10] = { }; int main(){ int a,b,k; while(cin>>a>>b){ for(int i = a;i <= b;i++){ k = i; while(k){ op[k%10]++; k/=10; } } for(int i = 0;i<10;i++){ if(i==9) cout<<op[i]<<endl; else cout<<op[i]<<" "; } op[0] =0,op[1] =0,op[2] =0,op[3] =0,op[4] =0,op[5] =0, op[6] =0,op[7] =0,op[8] =0,op[9] =0; } return 0; } |
Double click to view unformatted code.