#C14901. List Factorials
List Factorials
List Factorials
Given a list of non-negative integers, compute the factorial for each integer. The factorial of a number (n), denoted by (n!), is defined as (n! = \prod_{i=1}^{n} i) with (0! = 1). For each integer in the input list, output the number and its factorial. This problem tests your ability to handle basic loops and I/O in multiple programming languages.
inputFormat
The first line of input contains an integer (N) representing the count of numbers. The second line contains (N) space-separated non-negative integers.
outputFormat
For each input number, output a line containing two space-separated integers: the number and its factorial.## sample
3
1 2 3
1 1
2 2
3 6
</p>