알고리즘 풀이/백준
2577번-숫자의 개수
claire
2022. 1. 13. 00:54
#include<bits/stdc++.h>
using namespace std;
int num[10];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int a;
int total=1;
for (int i = 0; i < 3; i++) {
cin >> a;
total *= a;
}
string l = to_string(total);
for (auto c : l) {
num[c - '0']++;
}
for (int i = 0; i < 10; i++)cout << num[i]<<"\n";
}