mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-30 23:16:30 +00:00
21 lines
318 B
C++
21 lines
318 B
C++
|
#include <bits/stdc++.h>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
int n, ans[15], t;
|
||
|
|
||
|
int main() {
|
||
|
cin >> n;
|
||
|
for (int i = 1; i <= n; i++) {
|
||
|
t = i;
|
||
|
while (t) {
|
||
|
ans[t % 10]++;
|
||
|
t /= 10;
|
||
|
}
|
||
|
}
|
||
|
for (int i = 0; i < 10; i++) {
|
||
|
cout << ans[i] << endl;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|