You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
369 B

2 years ago
#include <bits/stdc++.h>
using namespace std;
const int N = 11;
2 years ago
int b[N];
2 years ago
int main() {
int m, n;
cin >> m >> n;
2 years ago
for (int x = m; x <= n; x++) {
int t = x;
2 years ago
while (t) {
2 years ago
int a = t % 10;
b[a]++;
2 years ago
t /= 10;
}
}
2 years ago
for (int i = 0; i <= 9; i++) cout << b[i] << " ";
2 years ago
return 0;
}