#K70462. Product of Primes
Product of Primes
Product of Primes
Given an integer \( n \), your task is to compute the product of all prime numbers less than \( n \). If there are no primes less than \( n \) (i.e. when \( n \leq 2 \)), the product is defined to be 1.
Formally, define \( P(n) = \prod_{p < n,\; p \text{ is prime}} p \), with the convention that \( P(n) = 1 \) if no primes exist in the range.
You will be given multiple test cases. For each test case, compute the value of \( P(n) \) and output the result on a separate line.
inputFormat
The first line of input contains a single integer \( T \), the number of test cases.
Each of the following \( T \) lines contains one integer \( n \) (\( n > 0 \)).
outputFormat
For each test case, output the product of all prime numbers less than \( n \) on a separate line.
## sample3
10
5
2
210
6
1
</p>