Product of factors of number
Basic Accuracy: 23.36% Submissions: 1478 Points: 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

 

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.