#K92022. Products of Digits

    ID: 38105 Type: Default 1000ms 256MiB

Products of Digits

Products of Digits

You are given a list of non-negative integers. For each integer, compute the product of its digits. For example, for the number 123, the calculation is given by $$1 \times 2 \times 3 = 6$$. Your task is to output the products of the digits for each number in the list.

inputFormat

The first line of input contains an integer nn, representing the number of integers. The second line contains nn space-separated integers.

outputFormat

Print nn space-separated integers, where each integer is the product of the digits of the corresponding input number.## sample

3
123 45 11
6 20 1