Micro and Optimus Prime
Practice
0 (0 votes)
Mathematics
Easy
Mathematics
Mathamatics
Problem
46% Success 1209 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Micro has discovered new type of numbers, he is calling them Optimus Primes. He defined a function,\(f(x) = sum \space \space of \space powers \space of \space prime \space factors \space in \space x's \space prime \space factorization\) A number x is Optimus Prime if \(f(x)\) is exactly 1 less than its total number of divisors. Now, Micro is interested in finding out the smallest Optimus Prime having \(f(x) = N\). Help Micro with this task.

Input:
First line consists of a single integer T denoting the number of test cases.
Each of the following T lines consists of a single integer denoting N.

Output:
Print the required answer for each test case in a new line. Since answer can be large print it modulo \(10^9+7\).

Constraints:
\(1 \le T \le 10^5\)
\(1 \le N \le 10^{18}\)

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
Tags:
Easy
Points:50
4 votes
Tags:
ApprovedCombinatoricsData StructuresFenwick TreeFenwick treeHardOpenTrees
Points:20
1 votes
Tags:
Easy