Factor product

0

0 votes
Medium-Hard
Problem

Given a number n, what will be product of it's prime factors ?
E.g. :- n = 12
60 = 2235
Product of Prime factors : 2
3*5 = 30.

Input
First line contains an integer t, number of test cases.
Next will be t lines, each will contain a number n, for which you have to find the product of prime factors.

Output
Print t lines, ith line should contain product of prime factor of ith test case.

Constraints
1<=t<=1000000
1<=n<=1000000

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?