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
355 B

#include <bits/stdc++.h>
using namespace std;
int x;
const int N = 10;
int b[N];
// int -> INT_MAX-> 2^31-1
// 2147483647
// 1124324234 不溢出
// 0232300000
int main() {
cin >> x;
while (x) {
int a = x % 10;
b[a]++;
x /= 10;
}
for (int i = 0; i <= 9; i++) cout << b[i] << " ";
return 0;
}