P12970 [HackerEarth] euler 124
普及
题目描述

Having gained some experience with Prime Numbers, Robin now seeks Revenge from Bruce. So, while they are on their way from the Airport to the Summit, Robin comes up with a new Prime based Puzzle for Bruce.

He asks him to find rad(n) for t numbers which he lists before Bruce and then form a sorted table on the values of rad(n) (in ascending order) and he defines rad(n) as the product of the distinct prime factors of n. He then asks him to find E(k) which he defines as the kth element in the sorted table. Bruce has got to prepare for the Summit and so he seeks your help. Help him solve this puzzle to maintain his status as the The Dark Knight of Gotham.

Input:
First line contains t, the number of testcases, and t lines follow after it each containing a single integer k.

Output: Display E(k) for each value of n in a separate line

Constraints:

t ≤ 500

k ≤ 10000

Table is made for n values till 10000SAMPLE INPUT
5
1
3
5
6
10

SAMPLE OUTPUT
1
4
3
9
10

Explanation

Refer the table for n values till 10 in the question description and Cross-Reference it with the sample input/output.

输入格式

见题面

输出格式

见题面

样例输入
100 6451 74308 29045 71720 99096 32196 31151 85640 24317 88001 39081 88765 99510 27026 91492 99379 85315 99440 15214 72870 56522 11836 99137 29128 84189 81146 48602 29042 72858 43179 3314 24053 88284 65951 32344 62190 5704 4021 3497 71605 6433 44193 61129 58361 51451 35256 36438 49068 64649 64807 57319 80919 65543 44768 21077 91814 1487 93856 42587 91437 42838 60048 92951 530 20992 8997 99260 30072 8860 15392 84754 34670 66105 33409 90507 15178 97333 89692 34686 64430 431 37703 33511 46934 14400 35834 29235 78468 11245 63309 44767 24746 14899 67713 12025 69676 71642 45879 1643 13190
样例输出
18036 57741 10451 53477 98513 49480 11714 76385 15668 80283 17491 81533 99195 9305 86014 98981 75853 99083 36700 55361 67724 7515 98583 42008 73999 68993 25558 83568 55342 41588 19500 7698 80742 45487 37386 40865 15012 64256 2891 53286 31936 64998 39559 36131 28505 14574 61832 52068 43883 88156 34847 68611 89980 22161 18567 86547 45619 89894 40564 85929 81976 38217 88411 2888 49168 18029 98783 44168 65559 3742 74930 14134 45681 79308 84394 3659 95606 83054 14145 43613 48000 65672 66475 24023 3369 60008 84496 64581 6957 42241 22159 40325 88625 47649 2569 50110 53345 23117 78848 2951