cho.sh
NotesCho Mini
Loading...

Digit Counts in a Product

Time limit

1s

Memory limit

128 MB

Problem

Three natural numbers A, B, and C are given. Multiply the three numbers, write the result in decimal notation, and determine how many times each digit from 0 through 9 appears.

Input

The first line contains A, the second line contains B, and the third line contains C. Each number is a natural number greater than or equal to 100 and less than 1000.

Output

On the first line, print how many times the digit 0 appears in the decimal representation of A × B × C. Then, from the second through the tenth line, print the counts for digits 1 through 9 in order, one count per line.