F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Just Do It

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1803    Accepted Submission(s): 1216


Problem Description
Now we define a function F(x), which means the factors of x. In particular, F(1) = 1,since 1 only has 1 factor 1, F(9) = 3, since 9 has 3 factors 1, 3, 9. Now give you an integer k, please find out the minimum number x that makes F(x) = k.
 

Input
The first line contains an integer t means the number of test cases.
The follows t lines, each line contains an integer k. (0 < k <= 100).
 

Output
For each case, output the minimum number x in one line. If x is larger than 1000, just output -1.
 

Sample Input
4 4 2 5 92
 

Sample Output
6 2 16 -1
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-11 18:11:57, Gzip enabled