#include <iostream>

#define NUM 10
using namespace std;

//int getDigitCount(int Value)
//{
//	int count = 0;
//	
//	
//	while (true)
//	{
//		Value = Value / 10;
//		count = count + 1;
//		
//		if (Value == 0)
//		{
//			break;
//		}
//	}
//	
//	return count;
//}

int main(void)
{
	int A, B, C = 0;
	int sum = 0;
	int count = 0;
	
	cin >> A >> B >> C;
	
	if (A>=100 and A<1000 and B>=100 and B<1000 and C>=100 and C<1000) 
	{
		sum = A * B * C;
//		count = getDigitCount(sum);
		int Array[NUM] = {0,};
		
		while (sum!=0)
		{
			Array[sum % 10] = Array[sum % 10] + 1;
			sum = sum / 10;
		}
		
		
		for (int j=0; j<NUM; j++) // Loop for printing the count of each digit.
		{
			cout << Array[j] << endl;
		}
		
	}
	
	return 0;
}

'Computer Science > 백준 알고리즘' 카테고리의 다른 글

[백준] 2588번 곱셈 (C++)  (0) 2022.03.16
[백준] 2581번 소수 (C++)  (0) 2022.03.16
[백준] 2562번 최대값 (C++)  (0) 2022.03.16
[백준] 2558번 A+B - 2 (C++)  (0) 2022.03.16
[백준] 2557번 Hello World (C++)  (0) 2022.03.16

+ Recent posts