#P4318. 完全平方数
完全平方数
Description
Xiao X has liked numbers since childhood. Strangely, he hates perfect squares other than . He finds those numbers unpleasant to look at. As a result, he also hates every positive integer that is a multiple of these perfect squares. However, this does not affect his love for all the other numbers.
It is Xiao X’s birthday, and Xiao W wants to give him a number as a gift. Of course, he cannot give a number that Xiao X hates. He listed all the numbers that Xiao X does not hate and then chose the -th number to give to Xiao X. Xiao X happily accepted it.
Now Xiao W cannot remember which number he gave to Xiao X. Can you help him?
Input Format
Multiple test cases. The first line contains an integer , the number of test cases.
From the -nd to the -th lines, each line contains an integer , describing one test case as stated above.
Output Format
Output lines, one answer per test case. In the -th line, output the -th positive integer that is not a multiple of any perfect square greater than .
4
1
13
100
1234567
1
19
163
2030745
Hint
For 50% of the testdata, .
For 100% of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号