#include<bits/stdc++.h> using namespace std; int main() { int m,n; while (cin >> m >>n){ int a[10] = {0}; int p; for(int i = m; i <= n; i++){ p = i; while (p != 0){ a[p % 10]++; p /= 10; } } for(int i = 0; i < 10; i++){ cout<< a[i] << " "; } cout << endl; } return 0; } |
Double click to view unformatted code.