2577 : 숫자의 개수


제출 코드
#include <iostream>
using namespace std;
int main() {
int a, b, c, temp = 0;
int arr[10] = {}; //최대 자리수 길이 10자리
cin >> a >> b >> c;
temp = a * b * c;
while (temp != 0) {
arr[temp % 10]++; /*temp % 10 << 자리수 표시*/
temp /= 10;
}
for (int i : arr) {
cout << i << "\n";
}
}