Product of factors of number
Submissions: 1206   Accuracy:

23.91%

  Difficulty: Basic   Marks: 1

Given a number N. The task is to find the product of all factors of N. Since the product can be very large answer it in modulo 109 + 7.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains a number N as input.

Output:
For each test case, print the required product in new line.

Constraints:
1 <= T <= 500
1 <= N <= 106

Example:
Input:
2
6
12

Output:
36
1728

Explanation:
Testcase 1:
The product of factors of a given number 6 is 1*2*3*6 = 36

 

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Arun Tyagi
Author: arun03


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.